diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2016-09-25 12:48:32 +0200 |
---|---|---|
committer | Stephen Finucane <stephenfinucane@hotmail.com> | 2016-09-25 16:19:23 +0100 |
commit | 3f303f1edcd5afeb922ba0bb756ea64c0371873f (patch) | |
tree | cdc72d78be72c894390370474320f4e962a8b39e | |
parent | 2a915efdf95a691577738418ef31ed3f2b6383ca (diff) | |
download | patchwork-3f303f1edcd5afeb922ba0bb756ea64c0371873f.tar patchwork-3f303f1edcd5afeb922ba0bb756ea64c0371873f.tar.gz |
bin/pwclient: fix spurious except catch
The 'with' statement does not start an exception block like 'try' would,
so we get an error executing pwclient:
File "/home/ymorin/bin/pwclient", line 300
except IOError:
^
SyntaxError: invalid syntax
Instead, don't try to catch any exception: any failure will be
propagated back up the stack and eventually cause an abort, which is
anyway what the except clause was trying to do.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Stephen Finucane <stephenfinucane@hotmail.com>
Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
-rwxr-xr-x | patchwork/bin/pwclient | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index b63db53..ce18e54 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -297,9 +297,6 @@ def action_get(rpc, patch_id): with open(fname, 'w') as f: f.write(unicode(s).encode("utf-8")) print('Saved patch to %s' % fname) - except IOError: - sys.stderr.write("Failed to write to %s\n" % fname) - sys.exit(1) def action_apply(rpc, patch_id, apply_cmd=None): |