From a8de43b00f22057a10c11db4ad349c38bb78ef10 Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Sun, 3 Jul 2016 13:14:12 -0400 Subject: [PATCH] Easy fixes for Python3 --- src/usr/bin/diffuse | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usr/bin/diffuse b/src/usr/bin/diffuse index 0a0d087..4006257 100755 --- a/src/usr/bin/diffuse +++ b/src/usr/bin/diffuse @@ -71,7 +71,7 @@ WEBSITE = 'http://diffuse.sourceforge.net/' # print a UTF-8 string using the host's native encoding def printMessage(s): try: - print codecs.encode(unicode(s, 'utf_8'), sys.getfilesystemencoding()) + print(codecs.encode(unicode(s, 'utf_8'), sys.getfilesystemencoding())) except UnicodeEncodeError: pass @@ -901,7 +901,7 @@ class Preferences: if key != 'git': temp.append([ 'Boolean', key + '_cygwin', False, _('Update paths for Cygwin') ]) vcs_folders_template.extend([ name, temp ]) - vcs_template.append(vcs_folders_template) + vcs_template.append(vcs_folders_template) self.template.extend([ _('Version Control'), vcs_template ]) self._initFromTemplate(self.template) @@ -2387,7 +2387,7 @@ class _Svn: result = [] try: prev = self._getPreviousRevision(rev) - except ValueError, e: + except ValueError as e: logError(_('Error parsing revision %s.') % (rev, )) return result @@ -2643,7 +2643,7 @@ class VCSs: def findByFolder(self, path, prefs): path = os.path.abspath(path) for vcs in prefs.getString('vcs_search_order').split(): - if vcs in self._get_repo: + if vcs in self._get_repo: repo = self._get_repo[vcs](path, prefs) if repo: return repo