From: Zac Medico Date: Thu, 2 Aug 2007 17:19:32 +0000 (-0000) Subject: For bug #187518, handle EISDIR thrown from mkdir when the directory already exists... X-Git-Tag: v2.1.3.9~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c291e994f369cb29da3ab2a4d169e9c669ef20c;p=portage.git For bug #187518, handle EISDIR thrown from mkdir when the directory already exists on FreeBSD. (trunk r7544) svn path=/main/branches/2.1.2/; revision=7545 --- diff --git a/pym/portage_util.py b/pym/portage_util.py index d71add57e..8e4a8cb44 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -852,7 +852,7 @@ def ensure_dirs(dir_path, *args, **kwargs): created_dir = True except OSError, oe: func_call = "makedirs('%s')" % dir_path - if errno.EEXIST == oe.errno: + if oe.errno in (errno.EEXIST, errno.EISDIR): pass elif oe.errno == errno.EPERM: raise OperationNotPermitted(func_call)