Runnable with both Python3 and Python2, with PyQt4 #2249

Open
kashikoibumi wants to merge 60 commits from kashikoibumi/py3 into v0.6
3 changed files with 13 additions and 5 deletions
Showing only changes of commit d9efe1cf46 - Show all commits

View File

@ -840,9 +840,10 @@ class MyForm(settingsmixin.SMainWindow):
TTL = config.getint('bitmessagesettings', 'ttl')
if TTL < 3600: # an hour
TTL = 3600
elif TTL > 28*24*60*60: # 28 days
TTL = 28*24*60*60
self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
elif TTL > 28 * 24 * 60 * 60: # 28 days
TTL = 28 * 24 * 60 * 60
self.ui.horizontalSliderTTL.setSliderPosition(
int((TTL - 3600) ** (1 / 3.199)))
self.updateHumanFriendlyTTLDescription(TTL)
QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(

View File

@ -4,7 +4,10 @@ Folder tree and messagelist widgets definitions.
# pylint: disable=too-many-arguments,bad-super-call
# pylint: disable=attribute-defined-outside-init
from cgi import escape
try:
from cgi import escape
except ImportError:
from html import escape
from unqstr import ustr, unic
from PyQt4 import QtCore, QtGui

View File

@ -23,7 +23,11 @@ def doCleanShutdown():
objectProcessorQueue.put(('checkShutdownVariable', 'no data'))
for thread in threading.enumerate():
if thread.isAlive() and isinstance(thread, StoppableThread):
try:
alive = thread.isAlive()
except AttributeError:
alive = thread.is_alive()
if alive and isinstance(thread, StoppableThread):
thread.stopThread()
UISignalQueue.put((