mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 02:46:49 +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)
|
||||
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…
x
Reference in New Issue
Block a user