From fbe59c409dcf2a9f8c5f2d4b5e29fbefd2702d71 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 5 Jul 2013 13:55:40 +0700 Subject: [PATCH] fixing bug for new configs --- src/bitmessageqt/__init__.py | 8 ++++++-- src/class_asyncoreThread.py | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 3c4f7ab7..7a348529 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2771,8 +2771,12 @@ class settingsDialog(QtGui.QDialog): self.ui.comboBoxMaxCores.setCurrentIndex(5)""" # SMTP & POP3 tab - self.ui.checkBoxEnableSMTPPOP3Servers.setChecked( - shared.config.getboolean('bitmessagesettings', 'smtppop3enable')) + try: + self.ui.checkBoxEnableSMTPPOP3Servers.setChecked( + shared.config.getboolean('bitmessagesettings', 'smtppop3enable')) + except: + self.ui.checkBoxEnableSMTPPOP3Servers.setChecked(False) + try: self.ui.lineEditSMTPPort.setText( str(shared.config.getint('bitmessagesettings', 'smtpport'))) diff --git a/src/class_asyncoreThread.py b/src/class_asyncoreThread.py index 7199b100..75225d1c 100644 --- a/src/class_asyncoreThread.py +++ b/src/class_asyncoreThread.py @@ -1,6 +1,7 @@ import asyncore import shared import threading +import time class asyncoreThread(threading.Thread): @@ -14,6 +15,5 @@ class asyncoreThread(threading.Thread): while True: asyncore.loop(timeout=1) # Despite the horrible parameter name, this function will not timeout until all channels are closed. - shared.printLock.acquire() - print("all asyncore modules dead!") - shared.printLock.release() + time.sleep(1) +