Antoni Segura Puimedon has uploaded a new change for review. Change subject: Fix vdsm-tool error when importing netinfo ......................................................................
Fix vdsm-tool error when importing netinfo netinfo is part of lib/vdsm which is supposed to be a python package without any dependency on the vdsm modules that reside in /usr/share/vdsm . This patch fixes one of such dependencies by moving NetinfoErrors to netinfo.py Change-Id: Id61bb6191c4dad08bf13680906545e0c63dfebfa Signed-off-by: Antoni S. Puimedon <[email protected]> --- M lib/vdsm/netinfo.py M vdsm/neterrors.py 2 files changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/14143/1 diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py index 3ecc483..c890d9e 100644 --- a/lib/vdsm/netinfo.py +++ b/lib/vdsm/netinfo.py @@ -35,7 +35,6 @@ import libvirtconnection import constants -import neterrors as ne from config import config from storage.misc import execCmd @@ -53,6 +52,8 @@ REQUIRED_BONDINGS = frozenset(('bond0', 'bond1', 'bond2', 'bond3', 'bond4')) +class NetInfoError(Exception): + pass def _match_nic_name(nic, patterns): return any(map(lambda p: fnmatch(nic, p), patterns)) @@ -86,7 +87,7 @@ rc, out, err = execCmd([constants.EXT_IPROUTE, '--details', 'link', 'show'], raw=True) if rc != 0: - raise ne.NetInfoError(err) + raise NetInfoError(err) interfaces = _parseIpLinkOutput(out) return Interfaces([nic for nic in interfaces['nic'] diff --git a/vdsm/neterrors.py b/vdsm/neterrors.py index c2f98af..034414c 100644 --- a/vdsm/neterrors.py +++ b/vdsm/neterrors.py @@ -36,7 +36,3 @@ self.errCode = errCode self.message = message Exception.__init__(self, self.errCode, self.message) - - -class NetInfoError(Exception): - pass -- To view, visit http://gerrit.ovirt.org/14143 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id61bb6191c4dad08bf13680906545e0c63dfebfa Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
