Skip to content

Commit

Permalink
removed "app" argument from QWebPage init. Cause does not work with t…
Browse files Browse the repository at this point in the history
…hreads (parent and child should be in one thread).
  • Loading branch information
pohmelie committed Jan 1, 2015
1 parent e0c829b commit a3cf742
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ class QTMessageProxy(object):
def __init__(self, logger):
self.logger = logger

def __call__(self, msgType, msg):
def __call__(self, *args):
msgType, msg = args[0], args[-1]
levels = {
QtDebugMsg: 'debug',
QtWarningMsg: 'warn',
Expand All @@ -150,7 +151,8 @@ class GhostWebPage(QWebPage):
"""
def __init__(self, app, ghost):
self.ghost = ghost
super(GhostWebPage, self).__init__(app)
# super(GhostWebPage, self).__init__(app)
super(GhostWebPage, self).__init__()

def chooseFile(self, frame, suggested_file=None):
filename = Ghost._upload_file
Expand Down Expand Up @@ -343,7 +345,7 @@ def __init__(
network_access_manager_class=NetworkAccessManager,
):
if not binding:
raise Exception("Ghost.py requires PySide or PyQt4")
raise Exception("Ghost.py requires PySide, PyQt4 or PyQt5")

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

Expand Down

0 comments on commit a3cf742

Please sign in to comment.