diff options
author | Russell Bryant <rbryant@redhat.com> | 2012-06-09 05:01:40 -0400 |
---|---|---|
committer | Russell Bryant <rbryant@redhat.com> | 2012-06-11 11:25:26 -0400 |
commit | 6450db6c125e80ba935b217482bbb96a4adfa44f (patch) | |
tree | 24ec6f483f25aaab9d90fcdc046d9806a1b3bc12 /update.py | |
parent | 4bfe5a40a523df45dffc128de2f263eedb51c2e8 (diff) | |
download | oslo-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.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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): |