fixed problem where bungloo wouldn't start when called directly
This commit is contained in:
parent
5d8b6887a6
commit
1568c19db9
1 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
import os, sys, pickle, subprocess
|
import os, sys, pickle, subprocess
|
||||||
from PyQt4 import QtCore, QtGui, QtWebKit
|
from PyQt4 import QtCore, QtGui, QtWebKit
|
||||||
|
|
||||||
if __file__ == 'Bungloo.py':
|
if __name__ == "__main__":
|
||||||
import Windows, Helper
|
import Windows, Helper
|
||||||
else:
|
else:
|
||||||
from bungloo import Windows, Helper
|
from bungloo import Windows, Helper
|
||||||
|
@ -13,6 +13,7 @@ import shutil
|
||||||
class Bungloo:
|
class Bungloo:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
print __file__
|
||||||
self.app = QtGui.QApplication(sys.argv)
|
self.app = QtGui.QApplication(sys.argv)
|
||||||
self.new_message_windows = []
|
self.new_message_windows = []
|
||||||
self.controller = Controller(self)
|
self.controller = Controller(self)
|
||||||
|
@ -29,7 +30,7 @@ class Bungloo:
|
||||||
self.app.exec_()
|
self.app.exec_()
|
||||||
|
|
||||||
def resources_path(self):
|
def resources_path(self):
|
||||||
if __file__ == 'Bungloo.py':
|
if __name__ == '__main__':
|
||||||
return os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
return os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
else:
|
else:
|
||||||
return Helper.Helper.get_resource_path()
|
return Helper.Helper.get_resource_path()
|
||||||
|
|
Reference in a new issue