diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-06 15:33:39 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-06 15:33:39 +0000 |
| commit | ddbb9e18c1f9b6492a2b05160da3ccdedb4aedce (patch) | |
| tree | e07db3806f805a35c9ff2b66cc2697045c3ceb23 | |
| parent | 8a967b16dc2ffd60bc19bee09f45e665ddcc9a81 (diff) | |
| parent | 7d82ec7308a416358e7ac587431d6c4a5d865970 (diff) | |
| download | oslo-ddbb9e18c1f9b6492a2b05160da3ccdedb4aedce.tar.gz oslo-ddbb9e18c1f9b6492a2b05160da3ccdedb4aedce.tar.xz oslo-ddbb9e18c1f9b6492a2b05160da3ccdedb4aedce.zip | |
Merge "Add update.sh to avoid import conflicts"
| -rw-r--r-- | update.py | 14 | ||||
| -rwxr-xr-x | update.sh | 13 |
2 files changed, 17 insertions, 10 deletions
@@ -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', diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..37d4a02 --- /dev/null +++ b/update.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Make some coffee and read https://code.launchpad.net/bugs/951197 + +VENV=.update-venv + +[ -d $VENV ] || virtualenv -q --no-site-packages $VENV + +. $VENV/bin/activate + +python setup.py install + +python update.py $* |
