fix for newer versions of Python3
This commit is contained in:
parent
c39dd18212
commit
d9efe1cf46
|
@ -842,7 +842,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
TTL = 3600
|
TTL = 3600
|
||||||
elif TTL > 28 * 24 * 60 * 60: # 28 days
|
elif TTL > 28 * 24 * 60 * 60: # 28 days
|
||||||
TTL = 28 * 24 * 60 * 60
|
TTL = 28 * 24 * 60 * 60
|
||||||
self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
|
self.ui.horizontalSliderTTL.setSliderPosition(
|
||||||
|
int((TTL - 3600) ** (1 / 3.199)))
|
||||||
self.updateHumanFriendlyTTLDescription(TTL)
|
self.updateHumanFriendlyTTLDescription(TTL)
|
||||||
|
|
||||||
QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(
|
||||||
|
|
|
@ -4,7 +4,10 @@ Folder tree and messagelist widgets definitions.
|
||||||
# pylint: disable=too-many-arguments,bad-super-call
|
# pylint: disable=too-many-arguments,bad-super-call
|
||||||
# pylint: disable=attribute-defined-outside-init
|
# pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
|
try:
|
||||||
from cgi import escape
|
from cgi import escape
|
||||||
|
except ImportError:
|
||||||
|
from html import escape
|
||||||
|
|
||||||
from unqstr import ustr, unic
|
from unqstr import ustr, unic
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
|
@ -23,7 +23,11 @@ def doCleanShutdown():
|
||||||
|
|
||||||
objectProcessorQueue.put(('checkShutdownVariable', 'no data'))
|
objectProcessorQueue.put(('checkShutdownVariable', 'no data'))
|
||||||
for thread in threading.enumerate():
|
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()
|
thread.stopThread()
|
||||||
|
|
||||||
UISignalQueue.put((
|
UISignalQueue.put((
|
||||||
|
|
Reference in New Issue
Block a user