From b6c1467d80b318c9f36c9ad437c25b6c1fe01609 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Tue, 25 Jun 2013 16:26:12 -0400 Subject: [PATCH] added missing imports --- src/bitmessagemain.py | 1 + src/bitmessageqt/__init__.py | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 35babf8c..74f48d1a 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -15,6 +15,7 @@ import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdo from SimpleXMLRPCServer import * import json import singleton +import os # Classes from class_sqlThread import * diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index a99503a6..e11b537a 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3,23 +3,6 @@ try: except: pass -try: - from PyQt4 import QtCore, QtGui - from PyQt4.QtCore import * - from PyQt4.QtGui import * -except Exception as err: - print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).' - print 'Error message:', err - sys.exit() - -try: - _encoding = QtGui.QApplication.UnicodeUTF8 -except AttributeError: - print 'QtGui.QApplication.UnicodeUTF8 error:', err - -def _translate(context, text): - return QtGui.QApplication.translate(context, text) - withMessagingMenu = False try: from gi.repository import MessagingMenu @@ -47,6 +30,23 @@ from pyelliptic.openssl import OpenSSL import pickle import platform +try: + from PyQt4 import QtCore, QtGui + from PyQt4.QtCore import * + from PyQt4.QtGui import * +except Exception as err: + print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).' + print 'Error message:', err + sys.exit() + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 +except AttributeError: + print 'QtGui.QApplication.UnicodeUTF8 error:', err + +def _translate(context, text): + return QtGui.QApplication.translate(context, text) + class MyForm(QtGui.QMainWindow):