Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / PLC / API.py
index 783463e..5c4cb9d 100644 (file)
@@ -5,7 +5,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 #
 # Copyright (C) 2004-2006 The Trustees of Princeton University
-# $Id: API.py,v 1.6 2006/10/27 18:57:32 mlhuang Exp $
+# $Id: API.py 5574 2007-10-25 20:33:17Z thierry $
 #
 
 import sys
@@ -96,13 +96,14 @@ class PLCAPI:
 
         # Load configuration
         self.config = Config(config)
-
-        # Initialize database connection
+       
+       # Initialize database connection
         if self.config.PLC_DB_TYPE == "postgresql":
             from PLC.PostgreSQL import PostgreSQL
             self.db = PostgreSQL(self)
+
         else:
-            raise PLCAPIError, "Unsupported database type " + config.PLC_DB_TYPE
+            raise PLCAPIError, "Unsupported database type " + self.config.PLC_DB_TYPE
 
     def callable(self, method):
         """