bitkeeper revision 1.1159.1.114 (4136e932LBZ1uaMs2kLCvyBHOfuxTQ)

Trap vifctl errors and warn.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-09-02 09:34:42 +00:00
1 parent 12576244f5
commit 3ff757502b
1 file changed
+7 -4
+7 -4
View File
@@ -53,8 +53,11 @@ class XendVnetInfo:
return vnet_cmd(['vnet.del', self.id])
def vifctl(self, op, vif, vmac):
fn = self.vifctl_ops[op]
return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
try:
fn = self.vifctl_ops[op]
return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
except XendError:
log.warning("vifctl failed: op=%s vif=%s mac=%s", op, vif, vmac)
class XendVnet:
"""Index of all vnets. Singleton.
@@ -72,8 +75,8 @@ class XendVnet:
self.vnet[info.id] = info
try:
info.configure()
except:
log.exception("Error configuring vnet")
except XendError, ex:
log.warning("Failed to configure vnet %s: %s", str(info.id), str(ex))
def vnet_of_bridge(self, bridge):
"""Get the vnet for a bridge (if any).
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.