Skip to content

Commit a3cf742

Browse files
committed
removed "app" argument from QWebPage init. Cause does not work with threads (parent and child should be in one thread).
1 parent e0c829b commit a3cf742

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ghost/ghost.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ class QTMessageProxy(object):
133133
def __init__(self, logger):
134134
self.logger = logger
135135

136-
def __call__(self, msgType, msg):
136+
def __call__(self, *args):
137+
msgType, msg = args[0], args[-1]
137138
levels = {
138139
QtDebugMsg: 'debug',
139140
QtWarningMsg: 'warn',
@@ -150,7 +151,8 @@ class GhostWebPage(QWebPage):
150151
"""
151152
def __init__(self, app, ghost):
152153
self.ghost = ghost
153-
super(GhostWebPage, self).__init__(app)
154+
# super(GhostWebPage, self).__init__(app)
155+
super(GhostWebPage, self).__init__()
154156

155157
def chooseFile(self, frame, suggested_file=None):
156158
filename = Ghost._upload_file
@@ -343,7 +345,7 @@ def __init__(
343345
network_access_manager_class=NetworkAccessManager,
344346
):
345347
if not binding:
346-
raise Exception("Ghost.py requires PySide or PyQt4")
348+
raise Exception("Ghost.py requires PySide, PyQt4 or PyQt5")
347349

348350
self.id = str(uuid.uuid4())
349351

0 commit comments

Comments
 (0)