mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-01 15:20:55 +00:00
Merge branch '2916.grid-manager-proposal.6' of https://github.com/tahoe-lafs/tahoe-lafs into 2916.grid-manager-proposal.6
This commit is contained in:
commit
c587c9ed19
@ -206,13 +206,10 @@ def sign(ctx, name, expiry_days):
|
|||||||
fname = "{}.cert.{}".format(name, next_serial)
|
fname = "{}.cert.{}".format(name, next_serial)
|
||||||
try:
|
try:
|
||||||
f = fp.child(fname).create()
|
f = fp.child(fname).create()
|
||||||
|
except FileExistsError:
|
||||||
|
f = None
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno == 17: # file exists
|
raise click.ClickException(f"{fname}: {e}")
|
||||||
f = None
|
|
||||||
else:
|
|
||||||
raise click.ClickException(
|
|
||||||
"{}: {}".format(fname, e)
|
|
||||||
)
|
|
||||||
next_serial += 1
|
next_serial += 1
|
||||||
with f:
|
with f:
|
||||||
f.write(certificate_data.encode("ascii"))
|
f.write(certificate_data.encode("ascii"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user