X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FAPI.py;h=5c06848540f7da11c21bbda111a4db1a893aba5b;hb=de9459521f01871f404100e3605078fbec5862f5;hp=783463efb3df94dcb1f11f775028a09c5191efa3;hpb=3096150fb12d118272e318bc6f126844d8462711;p=plcapi.git diff --git a/PLC/API.py b/PLC/API.py index 783463e..5c06848 100644 --- a/PLC/API.py +++ b/PLC/API.py @@ -5,7 +5,7 @@ # Mark Huang # # 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,v 1.8 2007/01/05 16:09:09 tmack Exp $ # 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): """