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: ##############################################