MCPcopy Index your code
hub / github.com/quentinhardy/odat / writeFile

Method writeFile

OracleDatabase.py:359–372  ·  view source on GitHub ↗

Write a new file named nameFile containing data Return True if Good, otherwise return False

(self,nameFile, data, mode='w')

Source from the content-addressed store, hash-verified

357 return str(errorMsg).replace('\n',' ').replace('\t',' ')
358
359 def writeFile(self,nameFile, data, mode='w'):
360 '''
361 Write a new file named nameFile containing data
362 Return True if Good, otherwise return False
363 '''
364 logging.info("Create the {0} file".format(nameFile))
365 try:
366 f = open(nameFile,mode)
367 f.write(data)
368 f.close()
369 except Exception as e:
370 logging.warning('Error during the writing of the {0} file: {1}'.format(nameFile,self.cleanError(e)))
371 return False
372 return True
373
374 def getDatabasePlatfromName(self):
375 """

Callers 2

runHttpUriTypeModuleFunction · 0.80
runUtlFileModuleFunction · 0.80

Calls 2

cleanErrorMethod · 0.95
closeMethod · 0.80

Tested by

no test coverage detected