Home | Trees | Indices | Help |
|
---|
|
1 from obitools.obischemas import kb 2 __connection__ = None 35 global __connection__ 6 param = {} 7 if hasattr(options, "dbname") and options.dbname is not None: 8 param["database"]=options.dbname 9 if hasattr(options, "dbhost") and options.dbhost is not None: 10 param["host"]=options.dbhost 11 if hasattr(options, "dbuser") and options.dbuser is not None: 12 param["username"]=options.dbuser 13 if hasattr(options, "dbpassword") and options.dbpassword is not None: 14 param["password"]=options.dbpassword 15 16 __connection__=kb.getConnection(**param) 17 __connection__.autocommit=options.autocommit1820 global __connection__ 21 22 if options is not None: 23 initConnection(options) 24 25 assert __connection__ is not None,"database connection is not initialized" 26 27 return __connection__28
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jul 22 10:48:41 2009 | http://epydoc.sourceforge.net |