summaryrefslogtreecommitdiff
path: root/lib/facter/pip_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter/pip_version.rb')
-rw-r--r--lib/facter/pip_version.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/pip_version.rb b/lib/facter/pip_version.rb
index bc725db..46c50d9 100644
--- a/lib/facter/pip_version.rb
+++ b/lib/facter/pip_version.rb
@@ -12,7 +12,7 @@ end
Facter.add("pip_version") do
has_weight 50
setcode do
- if pkg.retrieve[pkg.property(:ensure)] != 'purged'
+ unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)])
/^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1]
end
end