コード例 #1
0
            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)
コード例 #2
0
ファイル: main_wnd.py プロジェクト: pacobarter/gastos
 def openDB(self):
     self.clearLog()
     self.db_connection=db.dbOpen()
     self.addLog('DB opened')
コード例 #3
0
ファイル: main_wnd_2.py プロジェクト: pacobarter/gastos
 def open_db(self):
     self.db_connection=db.dbOpen()