print "OOOPs!!! there is an error!!!" resCapture( "Creating EC2 instances: {}".format(''.join( [P.resourceBase, ResSeparator, a])), exc) result = -1 return result # # using this to prevent the file from running if someone decides # to "import" this into their program # P = global_stuff() logging.getLogger('botocore').setLevel(logging.DEBUG) logging.getLogger('boto3').setLevel(logging.DEBUG) if __name__ == "__main__": result = -1 if db.dbOpen() == True: result = 0 if len(sys.argv) > 1: print "No arguments are supported by this application!" else: result = main() db.createOrchJournalEntry(P.custId, result, P.resText) db.dbClose() sys.exit(result)
def openDB(self): self.clearLog() self.db_connection=db.dbOpen() self.addLog('DB opened')
def open_db(self): self.db_connection=db.dbOpen()