diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-02-20 16:36:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-02-20 16:36:59 +0000 |
| commit | c18b9c38512d13bb1638c9acab634ec66fe586a7 (patch) | |
| tree | c9f673829d18caf0d1a8977900478b11b1a93a65 /kolla/cmd | |
| parent | 4b0b7931e6eb7a70aa5121dcb177065586b03a16 (diff) | |
| parent | da0f0cf1e672c42edf69f0a7080338c25b61706c (diff) | |
| download | kolla-c18b9c38512d13bb1638c9acab634ec66fe586a7.tar.gz kolla-c18b9c38512d13bb1638c9acab634ec66fe586a7.zip | |
Merge "fix the custom profile raise exception issue"
Diffstat (limited to 'kolla/cmd')
| -rwxr-xr-x | kolla/cmd/build.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index 120220331..dcbef7718 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -493,7 +493,15 @@ class KollaWorker(object): if self.conf.profile: for profile in self.conf.profile: - filter_ += self.conf.profiles[profile] + if profile not in self.conf.profiles: + self.conf.register_opt(cfg.ListOpt(profile, + default=[]), + 'profiles') + if len(self.conf.profiles[profile]) == 0: + msg = 'Profile: {} does not exist'.format(profile) + raise ValueError(msg) + else: + filter_ += self.conf.profiles[profile] if filter_: patterns = re.compile(r"|".join(filter_).join('()')) |
