From: Tony Mack Date: Mon, 12 Apr 2010 18:36:04 +0000 (+0000) Subject: fixed a bug when checking for invalid records X-Git-Tag: sfa-0.9-11~6^2~34 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=dfb45a5cfa125a4633bd21350855e6ad5ddbc88d;hp=083b6b0c8a4b85bcffe4397ed9ea82203ab0c6a1;p=sfa.git fixed a bug when checking for invalid records --- diff --git a/sfa/server/interface.py b/sfa/server/interface.py index 7172ef97..d6dc5c44 100644 --- a/sfa/server/interface.py +++ b/sfa/server/interface.py @@ -166,9 +166,9 @@ class Interfaces(dict): interfaces = [interfaces] for interface in interfaces: # make sure the required fields are present and not null - for key in required_fields: - if not interface.get(key): - continue + if not all([interface.get(key) for key in required_fields]): + continue + hrn, address, port = interface['hrn'], interface['addr'], interface['port'] url = 'http://%(address)s:%(port)s' % locals() # check which client we should use