Eryk Sun <eryk...@gmail.com> added the comment:

I suggesting changing the name to indicate that only OSError exceptions are 
suppressed, not SubprocessError exceptions. Maybe call it no_oserror.

As to the status code to use, if you want a a common code that can't interfere, 
it has to be either a negative value that can't be confused with a POSIX signal 
value or, if non-negative, it has to be at least 2**32, since a status code in 
Windows can be any non-negative 32-bit value.

> The shell is fast.  I'd just use the shell when replacing os.popen 
> uses in tests.

POSIX functions os.system() and os.popen() should be avoided if there's a 
chance of shell injection, but if you'll be using shell=True anyway, then 
what's the value in rewriting the code? os.popen() already uses 
subprocess.Popen() with shell=True.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42648>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to