comparison hggit/git_handler.py @ 1113:e31243879891

cleanup: use is not None instead of !=
author Sean Farley <sean@farley.io>
date Mon, 27 Nov 2017 18:26:57 -0500
parents c66e920d261f
children 6ef251fdbb30
comparison
equal deleted inserted replaced
1112:c66e920d261f 1113:e31243879891
679 a = RE_GIT_AUTHOR.match(author) 679 a = RE_GIT_AUTHOR.match(author)
680 680
681 if a: 681 if a:
682 name = self.get_valid_git_username_email(a.group(1)) 682 name = self.get_valid_git_username_email(a.group(1))
683 email = self.get_valid_git_username_email(a.group(2)) 683 email = self.get_valid_git_username_email(a.group(2))
684 if a.group(3) != None and len(a.group(3)) != 0: 684 if a.group(3) is not None and len(a.group(3)) != 0:
685 name += ' ext:(' + urllib.quote(a.group(3)) + ')' 685 name += ' ext:(' + urllib.quote(a.group(3)) + ')'
686 author = '%s <%s>' \ 686 author = '%s <%s>' \
687 % (self.get_valid_git_username_email(name), 687 % (self.get_valid_git_username_email(name),
688 self.get_valid_git_username_email(email)) 688 self.get_valid_git_username_email(email))
689 elif '@' in author: 689 elif '@' in author: