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) fname = "{}.cert.{}".format(name, next_serial)
try: try:
f = fp.child(fname).create() f = fp.child(fname).create()
except OSError as e: except FileExistsError:
if e.errno == 17: # file exists
f = None f = None
else: except OSError as e:
raise click.ClickException( raise click.ClickException(f"{fname}: {e}")
"{}: {}".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"))