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:
meejah 2023-02-21 23:21:09 -07:00
commit c587c9ed19

View File

@ -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"))