ppf: DatabaseAccess.py gets as argument any configuration file.
authorMariana Marasoiu <mariana.marasoiu@gmail.com>
Thu, 11 Aug 2011 19:33:13 +0000 (22:33 +0300)
committerroot p2p-next-02 <root@p2p-next-02.grid.pub.ro>
Thu, 11 Aug 2011 19:39:49 +0000 (22:39 +0300)
ppf/db-mysql/DatabaseAccess.py

index f12b3e2..e177b82 100644 (file)
@@ -25,9 +25,9 @@ class DatabaseAccess:
 
     def connect(self):
         if not os.path.isfile(self.dbconf):
-            print("Configuration file database.cnf doesn't exist!")
-            return False
-        f=open("database.cnf")
+            print "Configuration file %s doesn't exist!" % self.dbconf
+            sys.exit()
+        f=open(self.dbconf)
         confMap=yaml.load(f)
         f.close()
         try: