summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Stanley <fungi@yuggoth.org>2013-07-04 20:14:07 +0000
committerJenkins <jenkins@review.openstack.org>2013-07-12 22:46:21 +0000
commit5e7c0d558d0ebe85c23e855d8162d772fcdc3449 (patch)
tree4e43fcaf5d559f16c2c84f4595dab2ebe0f41a3c
parent7eaa598916df99877487afddd5798da1b4e548d1 (diff)
Make pip3_cmd a class method.
* modules/pip/lib/puppet/provider/package/pip3.rb(pip3_cmd): The instances class method was attempting to call the pip3_cmd instance method, which does not work. Instead define a self.pip3_cmd method it can call and then delegate the pip3_cmd instance method to that. Also corrects an error message typo in passing. Change-Id: I8a7b7ce353ac4293c2d7b82999402fa47dde6051 Reviewed-on: https://review.openstack.org/35708 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
-rw-r--r--lib/puppet/provider/package/pip3.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/provider/package/pip3.rb b/lib/puppet/provider/package/pip3.rb
index 5afb615..f155a57 100644
--- a/lib/puppet/provider/package/pip3.rb
+++ b/lib/puppet/provider/package/pip3.rb
@@ -124,11 +124,15 @@ Puppet::Type.type(:package).provide :pip3,
124 pip *args 124 pip *args
125 end 125 end
126 126
127 def pip3_cmd 127 def self.pip3_cmd
128 ['/usr/bin/python3-pip', '/usr/bin/pip3', '/usr/bin/pip-3.2', '/usr/bin/pip-3.3'].each do |p| 128 ['/usr/bin/python3-pip', '/usr/bin/pip3', '/usr/bin/pip-3.2', '/usr/bin/pip-3.3'].each do |p|
129 return p if File.exist?(p) 129 return p if File.exist?(p)
130 end 130 end
131 raise Puppet::Error, "Unable to fine pip3 binary."; 131 raise Puppet::Error, "Unable to find pip3 binary.";
132 end
133
134 def pip3_cmd
135 return self.class.pip3_cmd
132 end 136 end
133 137
134end 138end