Commits

German Larrain  committed 9c0ffa5

utils.version: applied unicode_literals for Python 3 compatibility.

Inspired in commits 4a103086d5 and 45c8818503 of the Django project.

  • Participants
  • Parent commits 7236e23

Comments (0)

Files changed (1)

File ars/utils/version.py

+from __future__ import unicode_literals
+
 import datetime
 import subprocess
 
 	main = '.'.join(str(x) for x in version[:parts])
 
 	if length == 'short':
-		return main
+		return str(main)
 
 	sub = ''
 	if version[3] == 'alpha' and version[4] == 0:
 	elif version[3] != 'final':
 		mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
 		sub = mapping[version[3]] + str(version[4])
-	return main + sub
+	return str(main + sub)
 
 
 def get_hg_changeset():