Do a final userscript command read on cleanup

On OS X, sometimes the userscript exited before the QSocketNotifier was
triggered. By doing a final read when cleaning up we make sure we don't
miss anything.

Fixes #1533.
This commit is contained in:
Florian Bruhin 2016-05-29 18:35:43 +02:00
parent ca87b9e285
commit 5b84fc93df
2 changed files with 3 additions and 1 deletions

View File

@ -71,6 +71,8 @@ class _QtFIFOReader(QObject):
def cleanup(self):
"""Clean up so the FIFO can be closed."""
self._notifier.setEnabled(False)
for line in self._fifo:
self.got_line.emit(line.rstrip('\r\n'))
self._fifo.close()

View File

@ -30,7 +30,7 @@ Feature: :spawn
And I run :spawn echo {url:pretty}
Then "Executing echo with args ['http://localhost:(port)/data/title with spaces.html'], userscript=False" should be logged
@linux
@posix
Scenario: Running :spawn with userscript
When I open about:blank
And I execute the userscript open_current_url