From c73b239bd10ae2b3cff334ace7ca7ded44850cbd Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 6 Jul 2019 11:59:55 +0800 Subject: Don't assume there is a tag author in tags Fixes #842 --- git/objects/tag.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git/objects/tag.py') diff --git a/git/objects/tag.py b/git/objects/tag.py index 19cb04bf..4295a03a 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -59,8 +59,9 @@ class TagObject(base.Object): self.tag = lines[2][4:] # tag - tagger_info = lines[3] # tagger - self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info) + if len(lines) > 3: + tagger_info = lines[3] # tagger + self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info) # line 4 empty - it could mark the beginning of the next header # in case there really is no message, it would not exist. Otherwise -- cgit v1.2.3