jeanphix/Ghost.py — pull request #35 by smeggingsmegger (2012-11-15 04:58:24+00:00)
Title: Adding kwarg for raising exceptions on JS errors and fixing a TypeError bug

In my own use of Ghost.py I have found that I wish to load the pages of my website and check them for JS errors and to kick off some Jasmine tests. With how Ghost.py was only logging the JS errors that made it less convenient than I wanted it to be.

I added the keyword argument: raise_js_errors to Ghost(). It is a boolean that defaults to False so that the old behavior is preserved.

Also, I fixed an issue where Ghost was throwing a type error:

TypeError: QNetworkDiskCache.data(QUrl): argument 1 has unexpected type 'QString'