|
11 | 11 | importlogging |
12 | 12 | importos |
13 | 13 | importsignal |
14 | | -fromsubprocessimportcall,Popen,PIPE,DEVNULL |
| 14 | +fromsubprocessimportPopen,PIPE,DEVNULL |
15 | 15 | importsubprocess |
16 | 16 | importthreading |
17 | 17 | fromtextwrapimportdedent |
@@ -544,16 +544,6 @@ def _terminate(self) -> None: |
544 | 544 | self.status=self._status_code_if_terminateorstatus |
545 | 545 | exceptOSErrorasex: |
546 | 546 | log.info("Ignored error after process had died: %r",ex) |
547 | | -exceptAttributeError: |
548 | | -# Try Windows. |
549 | | -# For some reason, providing None for stdout/stderr still prints something. This is why |
550 | | -# we simply use the shell and redirect to nul. Slower than CreateProcess. The question |
551 | | -# is whether we really want to see all these messages. It's annoying no matter what. |
552 | | -ifos.name=="nt": |
553 | | -call( |
554 | | - ("TASKKILL /F /T /PID %s 2>nul 1>nul"%str(proc.pid)), |
555 | | -shell=True, |
556 | | - ) |
557 | 547 | # END exception handling |
558 | 548 |
|
559 | 549 | def__del__(self)->None: |
|