Skip to content

Commit

Permalink
Modify only to decode if tag is of type bytes
Browse files Browse the repository at this point in the history
It may have had unintended consequences elsewhere to unintentionally
convert this str to unicode in Python 2.
  • Loading branch information
theherk committed Dec 9, 2015
1 parent fc34a86 commit e1a454c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def parse_version_tag(tag):
Returns a tuple of the version number, number of commits (if any), and the
Git SHA (if available).
'''
tag = tag.decode()
if isinstance(tag, bytes):
tag = tag.decode()
if not tag or '-g' not in tag:
return tag, None, None

Expand Down

0 comments on commit e1a454c

Please sign in to comment.