From 7d82ec7308a416358e7ac587431d6c4a5d865970 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 29 Jun 2012 18:22:29 +0100 Subject: Add update.sh to avoid import conflicts Attempts to fix #951197 The openstack nose plugin defines the openstack.common namespace which can result in exceptions when update.py attempts to import cfg. Avoid the issue by using an update.sh script which creates a no-site-packages virtualenv. Change-Id: I1ec5cf49361303b79306714122b860f6e4912215 --- update.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'update.py') diff --git a/update.py b/update.py index 509f5ab..e69c56a 100644 --- a/update.py +++ b/update.py @@ -63,16 +63,10 @@ import shutil import sys try: - from openstack import common - cfg = common.cfg -except AttributeError: - # NOTE(jkoelker) Workaround for LP951197 - try: - f, path, description = imp.find_module('openstack/common/cfg') - cfg = imp.load_module('cfg', f, path, description) - finally: - if f is not None: - f.close() + from openstack.common import cfg +except: + sys.stderr.write("Try running update.sh") + raise opts = [ cfg.ListOpt('modules', -- cgit