From 995c2c0a024ffa57bb19e146aeec7ec2fdedab8f Mon Sep 17 00:00:00 2001 From: Yichen Wang <yicwang@cisco.com> Date: Thu, 24 Sep 2015 16:06:08 -0700 Subject: [PATCH] Fix the issue while running VMTP from PyPI Change-Id: I16d85b82981675ee8f2eecee3f61c819514508d3 --- vmtp/config.py | 3 --- vmtp/network.py | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/vmtp/config.py b/vmtp/config.py index c611f24..ee49e61 100644 --- a/vmtp/config.py +++ b/vmtp/config.py @@ -16,9 +16,6 @@ from attrdict import AttrDict import yaml -with open('cfg.default.yaml') as fileobj: - settings = AttrDict(yaml.safe_load(fileobj)) - def config_load(file_name, from_cfg=None): '''Load a yaml file into a config dict, merge with from_cfg if not None The config file content taking precedence in case of duplicate diff --git a/vmtp/network.py b/vmtp/network.py index fae4f29..989b4a8 100644 --- a/vmtp/network.py +++ b/vmtp/network.py @@ -15,11 +15,10 @@ import time -from vmtp import VmtpException - # Module containing a helper class for operating on OpenStack networks from neutronclient.common.exceptions import NetworkInUseClient from neutronclient.common.exceptions import NeutronException +import vmtp class Network(object): @@ -52,7 +51,7 @@ class Network(object): int_net = self.lookup_network(self.config.reuse_network_name) self.vm_int_net.append(int_net) except IndexError: - raise VmtpException("Unable to find the network to be reused.") + raise vmtp.VmtpException("Unable to find the network to be reused.") return else: ##############################################