Rush has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/253044

Change subject: hiera_lookup -h adjust
......................................................................

hiera_lookup -h adjust

Right now it raises an exception when using '-h':

utils/hiera_lookup:31:in `abort':
    no implicit conversion of nil into String (TypeError)
    from utils/hiera_lookup:31:in `<main>'

I am convering error default to an empty string and
always tacking it on the end as no harm.  So 'usage'
can be called with arguments.

Change-Id: I63247992e665720be00a2692b441a2729d3da17c
---
M utils/hiera_lookup
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/253044/1

diff --git a/utils/hiera_lookup b/utils/hiera_lookup
index 118cceb..246ba97 100755
--- a/utils/hiera_lookup
+++ b/utils/hiera_lookup
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 # hiera_lookup: hiera lookup tool
 
-def usage(error=nil)
+def usage(error='')
   msg = <<-end
 hiera_lookup: hiera lookup tool
 Usage: hiera_lookup --fqdn=FQDN [--site=SITE] [--roles=ROLE1,ROLE2] KEY
@@ -11,9 +11,7 @@
 
 Example: hiera_lookup --fqdn=mw1020.eqiad.wmnet --roles=mediawiki::appserver 
admin::groups
 end
-  if error
     msg << error
-  end
 end
 
 begin

-- 
To view, visit https://gerrit.wikimedia.org/r/253044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63247992e665720be00a2692b441a2729d3da17c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush <r...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to