def setFile(self, filename):
self.filename = filename
if self.filename.count('/') > 0:
aggregate = os.path.join('/')
if self.filename.startswith('/') == False :
aggregate = os.path.join(os.getcwd()+'/')
dirs = self.filename.split('/')
for _dir in dirs[:-1]:
if _dir == '':
continue
aggregate = os.path.join(aggregate,_dir)
try:
os.mkdir(aggregate)
except Exception, e:
if type(e) == exceptions.OSError and e.errno == 13:
print e
pass
self.baseFilename = os.path.abspath(filename)
self.log4pyProps['filename'] = filename
评论列表
文章目录