mirror of https://github.com/django/django.git
[1.5.x] Ensured get_version returns a native string.
Returning unicode triggers a bug in Python 2.7: http://bugs.python.org/issue11638 This problem was introduced in4a103086
(unicode_literals). Backport of45c8818
from master.
This commit is contained in:
parent
d7f8894465
commit
9edec9e75d
|
@ -30,7 +30,7 @@ def get_version(version=None):
|
|||
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
|
||||
sub = mapping[version[3]] + str(version[4])
|
||||
|
||||
return main + sub
|
||||
return str(main + sub)
|
||||
|
||||
def get_git_changeset():
|
||||
"""Returns a numeric identifier of the latest git changeset.
|
||||
|
|
Loading…
Reference in New Issue