Skip to content

Commit b6c1467

Browse files
committed
added missing imports
1 parent f905ea1 commit b6c1467

2 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/bitmessagemain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from SimpleXMLRPCServer import *
1616
import json
1717
import singleton
18+
import os
1819

1920
# Classes
2021
from class_sqlThread import *

src/bitmessageqt/__init__.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@
33
except:
44
pass
55

6-
try:
7-
from PyQt4 import QtCore, QtGui
8-
from PyQt4.QtCore import *
9-
from PyQt4.QtGui import *
10-
except Exception as err:
11-
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).'
12-
print 'Error message:', err
13-
sys.exit()
14-
15-
try:
16-
_encoding = QtGui.QApplication.UnicodeUTF8
17-
except AttributeError:
18-
print 'QtGui.QApplication.UnicodeUTF8 error:', err
19-
20-
def _translate(context, text):
21-
return QtGui.QApplication.translate(context, text)
22-
236
withMessagingMenu = False
247
try:
258
from gi.repository import MessagingMenu
@@ -47,6 +30,23 @@ def _translate(context, text):
4730
import pickle
4831
import platform
4932

33+
try:
34+
from PyQt4 import QtCore, QtGui
35+
from PyQt4.QtCore import *
36+
from PyQt4.QtGui import *
37+
except Exception as err:
38+
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).'
39+
print 'Error message:', err
40+
sys.exit()
41+
42+
try:
43+
_encoding = QtGui.QApplication.UnicodeUTF8
44+
except AttributeError:
45+
print 'QtGui.QApplication.UnicodeUTF8 error:', err
46+
47+
def _translate(context, text):
48+
return QtGui.QApplication.translate(context, text)
49+
5050

5151
class MyForm(QtGui.QMainWindow):
5252

0 commit comments

Comments
 (0)