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>
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):