mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
Use more verbose exception catch.
This commit is contained in:
parent
8562496f82
commit
1a5d6ba90d
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ def unique_file(path, mode=0o777):
|
|||
try:
|
||||
file_d = os.open(fname, os.O_CREAT | os.O_EXCL | os.O_RDWR, mode)
|
||||
return os.fdopen(file_d, "w"), fname
|
||||
except OSError, e:
|
||||
except OSError as exception:
|
||||
# "File exists," is okay, try a different name.
|
||||
if exception.errno != errno.EEXIST:
|
||||
raise
|
||||
|
|
|
|||
Loading…
Reference in a new issue