[XEND] Prevent exception if PIF does not have a network.
authorAlastair Tse <atse@xensource.com>
Thu, 4 Jan 2007 16:34:19 +0000 (16:34 +0000)
committerAlastair Tse <atse@xensource.com>
Thu, 4 Jan 2007 16:34:19 +0000 (16:34 +0000)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/XendNode.py

index f0037e984a17761d3acc4fb2ca4f4b13b125775e..117ca3d25d336916a65867a713b9124f6ac10508 100644 (file)
@@ -103,7 +103,7 @@ class XendNode:
         saved_pifs = self.state_store.load_state('pif')
         if saved_pifs:
             for pif_uuid, pif in saved_pifs.items():
-                if pif['network'] in self.networks:
+                if pif.get('network') in self.networks:
                     network = self.networks[pif['network']]
                     try:
                         self.PIF_create(pif['name'], pif['MTU'], pif['VLAN'],