[Mpuls-commits] r1229 - wasko/branches/2.0/waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 4 11:13:12 CET 2010


Author: torsten
Date: 2010-02-04 11:13:11 +0100 (Thu, 04 Feb 2010)
New Revision: 1229

Modified:
   wasko/branches/2.0/waskaweb/lib/security.py
Log:
* waskaweb/lib/security.py (checkLogin): Take dbname, port, host etc.
  from config object and not from modulvars. Deleted modulvars.


Modified: wasko/branches/2.0/waskaweb/lib/security.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/security.py	2010-02-04 10:08:58 UTC (rev 1228)
+++ wasko/branches/2.0/waskaweb/lib/security.py	2010-02-04 10:13:11 UTC (rev 1229)
@@ -52,11 +52,6 @@
 
 log = logging.getLogger(__name__)
 
-HOST = '192.168.11.17'
-PORT = 5433
-DBNAME = u'ka_%s_db'
-USER = u'ka_%s_%s'
-
 # maps new FKZs to old
 NEW_DBS = {}
 
@@ -108,8 +103,11 @@
 
     log.info('Login: user "%s" in "%s"' % (user, dbname))
     try:
-        mydb = DB(dbname=DBNAME % dbname, host=HOST, port=PORT,
-                  user=USER % (dbname, user), password=password)
+        mydb = DB(dbname=config.get('mpuls.db.database') % dbname, 
+                  host=config.get('mpuls.db.host'), 
+                  port=config.get('mpuls.db.port'),
+                  user=config.get('mpuls.db.user') % (dbname, user), 
+                  password=password)
         try:
             enter(mydb)
             conn, cursor = None, None



More information about the Mpuls-commits mailing list