def close(self): self.driver.stopRecording(); if os.path.isfile(self.tmplogfile): importdata(self.tmplogfile, self.outfile, self.runName, 'description', True, False) if os.path.isfile(self.tmplogfile): os.remove(self.tmplogfile) if os.path.isdir(self.tmpdir): os.rmdir(self.tmpdir) self.process.terminate()
parser.add_option("-c", "--csv", action="store_true", default=False, help="Output the data to a CSV File.") parser.add_option("-r", "--recursive", action="store_true", default=False, help="Recursively delete information.") options, arguments = parser.parse_args() if int(options.verbose) == 2: setLogger(logging.DEBUG) logging.debug('Enabled DEBUG MODE') if len(arguments) == 0: print "Specify the command to follow, or -h for help." exit() elif arguments[0] == 'import': importdata(options.infile, options.outfile, options.runname, options.description, options.parse, options.csv) print "\n\n===============================" print "===============================" print "RUN: " + options.runname + ' IMPORTED' + \ "\n-------------------------------" elif arguments[0] == 'export': exportdata(options) elif arguments[0] == 'exportFile': exportFile(options) elif arguments[0] == 'list': listdata(options) elif arguments[0] == 'delete': deletedata(options)