Ori.livneh has submitted this change and it was merged.
Change subject: salt::grain: fix 'contains' check
......................................................................
salt::grain: fix 'contains' check
`grain-ensure contains` returns an empty list when the grain is set to a single
value; it should return a list containing the value instead.
Patch also contains whitespace fix for trebuchet.rb
Change-Id: I9e44d0c8612d20ea2af1c5c62ad6807e5b7abd2b
---
M modules/salt/files/grain-ensure.py
M modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Ori.livneh: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/salt/files/grain-ensure.py
b/modules/salt/files/grain-ensure.py
index f89e892..f5c828f 100644
--- a/modules/salt/files/grain-ensure.py
+++ b/modules/salt/files/grain-ensure.py
@@ -47,7 +47,7 @@
def get(grain):
values = caller.function('grains.get', grain)
- return values if isinstance(values, list) else []
+ return values if isinstance(values, list) else [values]
def add(grain, value):
diff --git a/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
b/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
index 0eddee1..4f7cbee 100644
--- a/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
+++ b/modules/trebuchet/lib/puppet/provider/package/trebuchet.rb
@@ -119,7 +119,7 @@
def latest_sha1
@cached_sha1 || begin
source = master || fail('Unable to determine Trebuchet master.')
- source = 'http://' + source unless source.include? '://'
+ source = 'http://' + source unless source.include? '://'
source.gsub!(/\/?$/, "/#{qualified_name}/.git/deploy/deploy")
tag = open(source) { |raw| PSON.load(raw).fetch('tag', nil) }
@cached_sha1 = resolve_tag(tag)
--
To view, visit https://gerrit.wikimedia.org/r/155838
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9e44d0c8612d20ea2af1c5c62ad6807e5b7abd2b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits