skip null records
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 23 Oct 2011 01:23:27 +0000 (21:23 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 23 Oct 2011 01:23:27 +0000 (21:23 -0400)
sfa/server/interface.py

index b7111e2..dbc8ef2 100644 (file)
@@ -70,7 +70,7 @@ class Interfaces(dict):
         
         required_fields = self.default_fields.keys()
         for record in records:
-            if not set(required_fields).issubset(record.keys()):
+            if not record or not set(required_fields).issubset(record.keys()):
                 continue
             # port is appended onto the domain, before the path. Should look like:
             # http://domain:port/path