mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-20 03:36:25 +00:00
Update src/allmydata/cli/grid_manager.py
Co-authored-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>
This commit is contained in:
parent
039c1d8037
commit
43d29986a6
@ -205,13 +205,10 @@ def sign(ctx, name, expiry_days):
|
||||
fname = "{}.cert.{}".format(name, next_serial)
|
||||
try:
|
||||
f = fp.child(fname).create()
|
||||
except FileExistsError:
|
||||
f = None
|
||||
except OSError as e:
|
||||
if e.errno == 17: # file exists
|
||||
f = None
|
||||
else:
|
||||
raise click.ClickException(
|
||||
"{}: {}".format(fname, e)
|
||||
)
|
||||
raise click.ClickException(f"{fname}: {e}")
|
||||
next_serial += 1
|
||||
with f:
|
||||
f.write(certificate_data.encode("ascii"))
|
||||
|
Loading…
Reference in New Issue
Block a user