From: Mark Huang Date: Fri, 27 Oct 2006 18:57:32 +0000 (+0000) Subject: import pgdb at the last minute to avoid requiring pgdb at doc build time X-Git-Tag: pycurl-7_13_1~427 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4c3c1eea2e69949fab2f993841eec7abfe07ee3f;p=plcapi.git import pgdb at the last minute to avoid requiring pgdb at doc build time --- diff --git a/PLC/API.py b/PLC/API.py index a42e6c93..e3e084d9 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.4 2006/10/13 20:00:21 mlhuang Exp $ +# $Id: API.py,v 1.5 2006/10/24 13:47:35 mlhuang Exp $ # import sys @@ -48,7 +48,6 @@ except ImportError: SOAPpy = None from PLC.Config import Config -from PLC.PostgreSQL import PostgreSQL from PLC.Faults import * import PLC.Methods @@ -67,6 +66,7 @@ class PLCAPI: # 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