mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:15:42 +02:00
Use more verbose exception catch.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user