changeset 214:931577ae72bb

Connection parameters in the admin application are not private.
author Daniele Nicolodi <daniele@grinta.net>
date Mon, 21 Nov 2011 16:10:05 +0100
parents 3d524d31d1c2
children 5b749cb6aa22
files src/ltpdarepo/admin.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/admin.py	Fri Nov 18 01:49:52 2011 +0100
+++ b/src/ltpdarepo/admin.py	Mon Nov 21 16:10:05 2011 +0100
@@ -103,10 +103,10 @@
 
         # database connection parameters that may be
         # overridden by command line arguments
-        self._hostname = self.config['HOSTNAME']
-        self._database = self.config['DATABASE']
-        self._username = self.config['USERNAME']
-        self._password = self.config['PASSWORD']
+        self.hostname = self.config['HOSTNAME']
+        self.database = self.config['DATABASE']
+        self.username = self.config['USERNAME']
+        self.password = self.config['PASSWORD']
 
     def __getattr__(self, name):
         if name in self.config:
@@ -115,8 +115,8 @@
 
     def connect(self, **kwargs):
         # open connection to the database
-        return mysql.connect(host=self._hostname, user=self._username,
-                             passwd=self._password, charset='utf8', **kwargs)
+        return mysql.connect(host=self.hostname, user=self.username,
+                             passwd=self.password, charset='utf8', **kwargs)
 
     @contextmanager
     def interact(self):