From: Tony Mack Date: Tue, 8 Dec 2009 23:42:56 +0000 (+0000) Subject: since GeniTable import posgres depented libraries, lets only import sfa.util.genitabl... X-Git-Tag: sfa-0.9-7~177 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=265d2777c4286111ee068da45fe40d9095ccfab6;p=sfa.git since GeniTable import posgres depented libraries, lets only import sfa.util.genitable inside the scope of methods that need it so ComponentAPI doest bail --- diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 5612d890..9ed350bf 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -20,7 +20,6 @@ from sfa.trust.credential import * from sfa.trust.certificate import * from sfa.util.misc import * from sfa.util.sfalogging import * -from sfa.util.genitable import * from sfa.util.api import * class GeniAPI(BaseAPI): @@ -140,6 +139,7 @@ class GeniAPI(BaseAPI): if not auth_hrn or hrn == self.config.SFA_INTERFACE_HRN: auth_hrn = hrn auth_info = self.auth.get_auth_info(auth_hrn) + from sfa.util.genitable import * table = GeniTable() records = table.findObjects(hrn) if not records: @@ -313,6 +313,7 @@ class GeniAPI(BaseAPI): def fill_record_geni_info(self, record): geni_info = {} type = record['type'] + from sfa.util.genitable import * table = GeniTable() if (type == "slice"): person_ids = record.get("person_ids", []) @@ -380,6 +381,7 @@ class GeniAPI(BaseAPI): # build a list of the new person ids, by looking up each person to get # their pointer newIdList = [] + from sfa.util.genitable import * table = GeniTable() records = table.find({'type': 'user', 'hrn': newList}) for rec in records: