##// END OF EJS Templates
util: add notindexed optional parameter to makedirs function
Angel Ezquerra -
r18938:e22107cf default
parent child Browse files
Show More
@@ -873,10 +873,10 b' class atomictempfile(object):'
873 if safehasattr(self, '_fp'): # constructor actually did something
873 if safehasattr(self, '_fp'): # constructor actually did something
874 self.discard()
874 self.discard()
875
875
876 def makedirs(name, mode=None):
876 def makedirs(name, mode=None, notindexed=False):
877 """recursive directory creation with parent mode inheritance"""
877 """recursive directory creation with parent mode inheritance"""
878 try:
878 try:
879 os.mkdir(name)
879 makedir(name, notindexed)
880 except OSError, err:
880 except OSError, err:
881 if err.errno == errno.EEXIST:
881 if err.errno == errno.EEXIST:
882 return
882 return
@@ -885,8 +885,8 b' def makedirs(name, mode=None):'
885 parent = os.path.dirname(os.path.abspath(name))
885 parent = os.path.dirname(os.path.abspath(name))
886 if parent == name:
886 if parent == name:
887 raise
887 raise
888 makedirs(parent, mode)
888 makedirs(parent, mode, notindexed)
889 os.mkdir(name)
889 makedir(name, notindexed)
890 if mode is not None:
890 if mode is not None:
891 os.chmod(name, mode)
891 os.chmod(name, mode)
892
892
General Comments 0
You need to be logged in to leave comments. Login now