def writeLog(self, time_path): try: return None pages = self.outItemLog() for page in pages: filepath = Config.pagePath + time_path + page[2] Config.createPath(filepath) filename = filepath + page[0] fout = open(filename, 'w') fout.write(page[3]) fout.close() except Exception as e: Common.log('# exception err in writeLog info: %s' % e)
def writeLog(self,time_path): try: return None pages = self.outItemLog() for page in pages: filepath = Config.pagePath + time_path + page[2] Config.createPath(filepath) #if not os.path.exists(filepath): # os.mkdir(filepath) filename = filepath + page[0] fout = open(filename, 'w') fout.write(page[3]) fout.close() except Exception as e: print '# exception err in writeLog info:',e