mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Ignore any unicode_escape decode fails when decoding emails (Fixes #122).
This is only needed with emails that have escape characters, as described in issue #46. If the call fails, it will most likely not affect us and can be safely ignored.
This commit is contained in:
parent
b3fbb3e3c3
commit
c80c822892
1 changed files with 4 additions and 1 deletions
|
@ -279,8 +279,11 @@ class Changes(object):
|
|||
def get_latest_author_by_email(self, name):
|
||||
if not hasattr(name, "decode"):
|
||||
name = str.encode(name)
|
||||
try:
|
||||
name = name.decode("unicode_escape", "ignore")
|
||||
except UnicodeEncodeError:
|
||||
pass
|
||||
|
||||
name = name.decode("unicode_escape", "ignore")
|
||||
return self.authors_by_email[name]
|
||||
|
||||
def get_latest_email_by_author(self, name):
|
||||
|
|
Loading…
Reference in a new issue