1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 18:26:15 +01:00

Fix URLGrabError exception handling.

URLGrabError class has no exception attribute,
use strerror to print error instead.

Signed-off-by: Oleg Girko <oleg.girko@jolla.com>
This commit is contained in:
Oleg Girko 2017-01-17 23:27:08 +00:00
parent 943a53d4d8
commit 361fec753a

View File

@ -143,7 +143,7 @@ def run(prg, argv=None):
print('Failed to reach a server:\n', e.reason, file=sys.stderr)
return 1
except URLGrabError as e:
print('Failed to grab %s: %s' % (e.url, e.exception), file=sys.stderr)
print('Failed to grab %s: %s' % (e.url, e.strerror), file=sys.stderr)
return 1
except IOError as e:
# ignore broken pipe