diff options
| author | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-07-19 15:30:49 +0800 |
|---|---|---|
| committer | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-07-22 20:37:35 +0900 |
| commit | 4cd94cd7633eb18c6928eef6ad3db1ac4ed4d406 (patch) | |
| tree | ae07b5e0b1b95a3b1d73cb6b845603538e8dd672 | |
| parent | cd78a6dbd48c346aabbc5554386d42ac5a4a5771 (diff) | |
| download | oslo-4cd94cd7633eb18c6928eef6ad3db1ac4ed4d406.tar.gz oslo-4cd94cd7633eb18c6928eef6ad3db1ac4ed4d406.tar.xz oslo-4cd94cd7633eb18c6928eef6ad3db1ac4ed4d406.zip | |
Fix issues syncing sample generator in update.py
When updating the openstack.common.config module, the shutil module
raises an exception when attemting to copy a directory.
Fixed to skip directories as copy targets and handle directories
of target module names.
Fixed problem of wrong import path of the generator module.
Change-Id: Ie8336b070573c74691ab5e7304dd05c540826c53
| -rw-r--r-- | update.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -167,6 +167,10 @@ def _copy_file(path, dest, base): '\"' + base + '.openstack.common') _replace(dest, + '=openstack\.common', + '=' + base + '.openstack.common') + + _replace(dest, 'possible_topdir, "oslo",$', 'possible_topdir, "' + base + '",') @@ -201,13 +205,14 @@ def _copy_module(mod, base, dest_dir): copy_pyfile(os.path.join(mod_path, s)) globs_to_copy = [ + os.path.join('tools', mod, '*.sh'), os.path.join('tools', mod + '*'), os.path.join('etc', 'oslo', mod + '*.conf'), os.path.join('contrib', mod + '*'), ] for matches in [glob.glob(g) for g in globs_to_copy]: - for match in matches: + for match in [x for x in matches if not os.path.isdir(x)]: dest = os.path.join(dest_dir, match.replace('oslo', base)) print("Copying %s to %s" % (match, dest)) _copy_file(match, dest, base) |
