From a527ae047df35d91159a1c3ecefe30c8acbbf9c9 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Sat, 27 Aug 2016 20:57:14 +0300 Subject: [PATCH] Fix unitialized access --- pupy/packages/all/pupyutils/safepopen.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pupy/packages/all/pupyutils/safepopen.py b/pupy/packages/all/pupyutils/safepopen.py index 2f3dc639..c583812a 100644 --- a/pupy/packages/all/pupyutils/safepopen.py +++ b/pupy/packages/all/pupyutils/safepopen.py @@ -51,20 +51,7 @@ class SafePopen(object): self._bufsize = 8196 self.returncode = None - if hasattr(subprocess, 'STARTUPINFO'): - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - self._popen_kwargs.update({ - 'startupinfo': startupinfo, - }) - - def _execute(self, read_cb, close_cb): - if read_cb: - read_cb = rpyc.async(read_cb) - - if close_cb: - close_cb = rpyc.async(close_cb) - + def execute(self, poll_delay=0.5): returncode = None try: kwargs = self._popen_kwargs