Skip to content

Commit

Permalink
Find another way to shut up patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Rossi committed Sep 13, 2012
1 parent 5647daf commit 905e5fd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions acidfs/__init__.py
Expand Up @@ -720,7 +720,7 @@ def expect(expectation, *msg):
expect(isinstance(blob, _Blob), "Not a blob")
with _tempfile() as tmp:
shutil.copyfileobj(blob.open(), open(tmp, 'wb'))
with _popen(['patch', tmp, '-'],
with _popen(['patch', '-s', tmp, '-'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as p:
Expand Down Expand Up @@ -973,10 +973,7 @@ def _popen(args, **kw):
yield proc
for stream in (proc.stdin, proc.stdout, proc.stderr):
if stream is not None:
if not stream.closed:
if stream.readable():
stream.read()
stream.close()
stream.close()
retcode = proc.wait()
if retcode != 0:
raise subprocess.CalledProcessError(retcode, repr(args))
Expand Down

0 comments on commit 905e5fd

Please sign in to comment.