Message236004
changeset 035b61b52caa has this:-
return (fd, _os.path.abspath(file))
except FileExistsError:
continue # try again
+ except PermissionError:
+ # This exception is thrown when a directory with the chosen name
+ # already exists on windows.
+ if _os.name == 'nt':
+ continue
+ else:
+ raise
raise FileExistsError(_errno.EEXIST,
"No usable temporary file name found")
Could we simply set a flag saying it's a PermissionError and then raise the appropriate PermissionError or FileExistsError at the end of the loop? |
|
Date |
User |
Action |
Args |
2015-02-14 22:51:27 | BreamoreBoy | set | recipients:
+ BreamoreBoy, georg.brandl, ncoghlan, rupole, tim.golden, zach.ware, steve.dower |
2015-02-14 22:51:27 | BreamoreBoy | set | messageid: <1423954287.63.0.223501496318.issue22107@psf.upfronthosting.co.za> |
2015-02-14 22:51:27 | BreamoreBoy | link | issue22107 messages |
2015-02-14 22:51:27 | BreamoreBoy | create | |
|