Easy fixes for Python3

This commit is contained in:
Romain Failliot 2016-07-03 13:14:12 -04:00
parent f34cf304f8
commit a8de43b00f
1 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ WEBSITE = 'http://diffuse.sourceforge.net/'
# print a UTF-8 string using the host's native encoding # print a UTF-8 string using the host's native encoding
def printMessage(s): def printMessage(s):
try: try:
print codecs.encode(unicode(s, 'utf_8'), sys.getfilesystemencoding()) print(codecs.encode(unicode(s, 'utf_8'), sys.getfilesystemencoding()))
except UnicodeEncodeError: except UnicodeEncodeError:
pass pass
@ -2387,7 +2387,7 @@ class _Svn:
result = [] result = []
try: try:
prev = self._getPreviousRevision(rev) prev = self._getPreviousRevision(rev)
except ValueError, e: except ValueError as e:
logError(_('Error parsing revision %s.') % (rev, )) logError(_('Error parsing revision %s.') % (rev, ))
return result return result