This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author plakhotich
Recipients martin.panter, paul.moore, plakhotich, r.david.murray, steve.dower, tim.golden, zach.ware
Date 2015-11-09.10:43:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Maybe the solution is to leave OSError catching after the conditional
(probably with some additional comments):

   if not (exist_ok and path.isdir(name)):
          mkdir(name, mode)
      except OSError as e:
          if not exist_ok or e.errno != errno.EEXIST or not path.isdir(name):

This should solve the problem. It also gives more or less guarantee
that errno will be EEXIST, while the current code will also raise an exception
on EROFS (read-only FS), ENOSPC (no space left) in addition to EACCES on Windows
(and possibly some other values on various systems - who knows?).
Date User Action Args
2015-11-09 10:43:43plakhotichsetrecipients: + plakhotich, paul.moore, tim.golden, r.david.murray, martin.panter, zach.ware, steve.dower
2015-11-09 10:43:43plakhotichsetmessageid: <>
2015-11-09 10:43:43plakhotichlinkissue25583 messages
2015-11-09 10:43:43plakhotichcreate