[issue25627] distutils : file "bdist_rpm.py" does not quote filenames when executing the rpm command

Martin Panter report at bugs.python.org
Sun Nov 29 18:05:32 EST 2015


Martin Panter added the comment:

Okay so now I see 2.7 doesn’t support the context manager. I was mainly curious why you didn’t want to use subprocess. However a bigger problem with your first patch is shlex.quote() does not appear to be in Python 2 either.

If you want to use proc.communicate() rather than reading line by line, perhaps subprocess.check_output() would be simpler. I’m not familiar with the RPM command but if there is only a modest amount of output it should be good enough.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25627>
_______________________________________


More information about the Python-bugs-list mailing list