Skip to content

Commit

Permalink
Merge "Use --get function instead of --has to validate presence of an…
Browse files Browse the repository at this point in the history
… object in the given section Closes-Bug: 1660278" into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 18, 2017
2 parents ebb4d57 + 38eb787 commit 23ed0c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrail_provisioning/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,9 @@ def get_config(self, fl, sec, var):
def has_config(self, fl, sec, var):
has = False
with settings(warn_only=True):
output = local("openstack-config --has %s %s %s" % (
output = local("openstack-config --get %s %s %s" % (
fl, sec, var), capture=True)
has = bool(int(output))
return has
return output.succeeded

def setup(self):
self.disable_selinux()
Expand Down

0 comments on commit 23ed0c4

Please sign in to comment.