[csw-devel] SF.net SVN: gar:[12025] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Dec 20 12:43:17 CET 2010
Revision: 12025
http://gar.svn.sourceforge.net/gar/?rev=12025&view=rev
Author: wahwah
Date: 2010-12-20 11:43:16 +0000 (Mon, 20 Dec 2010)
Log Message:
-----------
checkpkg: Log user name and database name
The database initialization line needs to be moved below the code that
processes command line options, because that's where the logging level is set.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/checkpkg2.py
csw/mgar/gar/v2/lib/python/configuration.py
Modified: csw/mgar/gar/v2/lib/python/checkpkg2.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg2.py 2010-12-20 10:37:47 UTC (rev 12024)
+++ csw/mgar/gar/v2/lib/python/checkpkg2.py 2010-12-20 11:43:16 UTC (rev 12025)
@@ -46,7 +46,6 @@
def main():
- configuration.SetUpSqlobjectConnection()
parser = optparse.OptionParser(USAGE)
parser.add_option("-d", "--debug",
dest="debug",
@@ -83,6 +82,7 @@
logging.basicConfig(level=logging_level)
logging.debug("Starting.")
+ configuration.SetUpSqlobjectConnection()
dm = database.DatabaseManager()
dm.AutoManage()
Modified: csw/mgar/gar/v2/lib/python/configuration.py
===================================================================
--- csw/mgar/gar/v2/lib/python/configuration.py 2010-12-20 10:37:47 UTC (rev 12024)
+++ csw/mgar/gar/v2/lib/python/configuration.py 2010-12-20 11:43:16 UTC (rev 12025)
@@ -104,6 +104,7 @@
'db_host': config.get("database", "host"),
'db_user': config.get("database", "user"),
'db_password': config.get("database", "password")}
+ logging.debug("db_name: %(db_name)s, db_user: %(db_user)s" % db_data)
if db_data["db_type"] == "mysql":
db_uri_tmpl = "%(db_type)s://%(db_user)s:%(db_password)s@%(db_host)s/%(db_name)s"
elif db_data["db_type"] == "sqlite":
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list