try:
val = self.sites[id]
except:
+ self.api.logger.error("Invalid RSpec: site ID %s not found" % id )
raise InvalidRSpec("site ID %s not found" % id)
return val
"""
tmp = []
for node in api.plshell.GetNodes(api.plauth, {'peer_id': None}):
- t = node['node_id'], Node(self, node)
- tmp.append(t)
+ try:
+ t = node['node_id'], Node(self, node)
+ tmp.append(t)
+ except:
+ self.api.logger.error("Failed to add node %s (%s) to RSpec" % (node['hostname'], node['node_id']))
+
return dict(tmp)
def get_ifaces(self, api):