From: Zac Medico Date: Thu, 2 Aug 2007 17:19:00 +0000 (-0000) Subject: For bug #187518, handle EISDIR thrown from mkdir when the directory already exists... X-Git-Tag: v2.2_pre1~910 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9d618bf6e536fec63b990f6352a80cac640a6dc2;p=portage.git For bug #187518, handle EISDIR thrown from mkdir when the directory already exists on FreeBSD. svn path=/main/trunk/; revision=7544 --- diff --git a/pym/portage/util.py b/pym/portage/util.py index d10cb1d6a..894ea44a0 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -856,7 +856,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)