userscripts: Move closing of fifo to _QtFIFOReader.

This commit is contained in:
Florian Bruhin 2015-12-12 00:33:25 +01:00
parent 49be07eb18
commit 3a2d031479

View File

@ -62,6 +62,7 @@ class _QtFIFOReader(QObject):
def cleanup(self):
"""Clean up so the FIFO can be closed."""
self._notifier.setEnabled(False)
self.fifo.close()
class _BaseUserscriptRunner(QObject):
@ -199,7 +200,6 @@ class _POSIXUserscriptRunner(_BaseUserscriptRunner):
"""Quit the thread and clean up when the reader finished."""
log.procs.debug("Cleaning up")
self._reader.cleanup()
self._reader.fifo.close()
self._reader.deleteLater()
self._reader = None
super()._cleanup()