|
|
@ -509,7 +509,12 @@ if __name__ == '__main__': |
|
|
|
conf = DataStore.CONFIG_DEFAULTS |
|
|
|
args, argv = readconf.parse_argv( [], conf) |
|
|
|
args.dbtype= config.get('database','type') |
|
|
|
args.connect_args = {'database' : config.get('database','database') } |
|
|
|
if args.dbtype == 'sqlite3': |
|
|
|
args.connect_args = { 'database' : config.get('database','database') } |
|
|
|
elif args.dbtype == 'MySQLdb': |
|
|
|
args.connect_args = { 'db' : config.get('database','database'), 'user' : config.get('database','user'), 'passwd' : config.get('database','pass') } |
|
|
|
elif args.dbtype == 'psycopg2': |
|
|
|
args.connect_args = { 'database' : config.get('database','database') } |
|
|
|
store = MyStore(args) |
|
|
|
|
|
|
|
thread.start_new_thread(listen_thread, (store,)) |
|
|
|