summaryrefslogtreecommitdiffstats
path: root/update.py
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-06-09 05:01:40 -0400
committerRussell Bryant <rbryant@redhat.com>2012-06-11 11:25:26 -0400
commit6450db6c125e80ba935b217482bbb96a4adfa44f (patch)
tree24ec6f483f25aaab9d90fcdc046d9806a1b3bc12 /update.py
parent4bfe5a40a523df45dffc128de2f263eedb51c2e8 (diff)
downloadoslo-6450db6c125e80ba935b217482bbb96a4adfa44f.tar.gz
oslo-6450db6c125e80ba935b217482bbb96a4adfa44f.tar.xz
oslo-6450db6c125e80ba935b217482bbb96a4adfa44f.zip
Get update.py to be able to copy rpc.
Part of blueprint common-rpc. Change-Id: I634bf7b0ce85900a34c9b5a4a295f1d806458bbf
Diffstat (limited to 'update.py')
-rw-r--r--update.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/update.py b/update.py
index 74421bb..509f5ab 100644
--- a/update.py
+++ b/update.py
@@ -162,7 +162,17 @@ def _copy_module(mod, base, dest_dir):
path = os.path.join(path, d)
_copy_file(os.path.join(path, '__init__.py'), base, dest_dir)
- _copy_file(_mod_to_path('openstack.common.' + mod) + '.py', base, dest_dir)
+ mod_path = _mod_to_path('openstack.common.%s' % mod)
+ mod_file = '%s.py' % mod_path
+ if os.path.isfile(mod_file):
+ _copy_file(mod_file, base, dest_dir)
+ elif os.path.isdir(mod_path):
+ dest = os.path.join(dest_dir, _mod_to_path(base),
+ 'openstack', 'common', mod)
+ _make_dirs(dest)
+ sources = filter(lambda x: x[-3:] == '.py', os.listdir(mod_path))
+ for s in sources:
+ _copy_file(os.path.join(mod_path, s), base, dest_dir)
def _create_module_init(base, dest_dir, *sub_paths):