mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
Don't crash on broken pipe (fixes bnc#661963).
This commit is contained in:
parent
b66ab73475
commit
1491dd4f4b
@ -5736,11 +5736,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
f = http_GET(u)
|
||||
run_pager(''.join(f.readlines()))
|
||||
else:
|
||||
for data in streamfile(u):
|
||||
sys.stdout.write(data)
|
||||
try:
|
||||
for data in streamfile(u):
|
||||
sys.stdout.write(data)
|
||||
except IOError, e:
|
||||
pass # Ignore broken pipe, i.e. when used like 'osc cat foo | head'
|
||||
else:
|
||||
e.osc_msg = 'If linked, try: cat -e'
|
||||
raise e
|
||||
except IOError, e:
|
||||
pass # Ignore broken pipe, i.e. when used like 'osc cat foo | head'
|
||||
|
||||
|
||||
# helper function to download a file from a specific revision
|
||||
|
Loading…
Reference in New Issue
Block a user