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 <rep...@bugs.python.org>
<http://bugs.python.org/issue25627>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to