Easy fixes for Python3
This commit is contained in:
parent
f34cf304f8
commit
a8de43b00f
|
@ -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
|
||||||
|
|
||||||
|
@ -901,7 +901,7 @@ class Preferences:
|
||||||
if key != 'git':
|
if key != 'git':
|
||||||
temp.append([ 'Boolean', key + '_cygwin', False, _('Update paths for Cygwin') ])
|
temp.append([ 'Boolean', key + '_cygwin', False, _('Update paths for Cygwin') ])
|
||||||
vcs_folders_template.extend([ name, temp ])
|
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.template.extend([ _('Version Control'), vcs_template ])
|
||||||
self._initFromTemplate(self.template)
|
self._initFromTemplate(self.template)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -2643,7 +2643,7 @@ class VCSs:
|
||||||
def findByFolder(self, path, prefs):
|
def findByFolder(self, path, prefs):
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
for vcs in prefs.getString('vcs_search_order').split():
|
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)
|
repo = self._get_repo[vcs](path, prefs)
|
||||||
if repo:
|
if repo:
|
||||||
return repo
|
return repo
|
||||||
|
|
Loading…
Reference in New Issue