From fae8ae4476142112db877470fe6d374c0e63acc9 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Tue, 7 Jan 2014 13:29:00 -0500 Subject: Silence facter by redirecting python -V stderr --- lib/facter/python_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/python_version.rb b/lib/facter/python_version.rb index a2bdb26..6b88ee9 100644 --- a/lib/facter/python_version.rb +++ b/lib/facter/python_version.rb @@ -14,7 +14,7 @@ end Facter.add("python_version") do has_weight 100 setcode do - /^.*(\d+\.\d+\.\d+)$/.match(Facter::Util::Resolution.exec('python -V'))[1] + /^.*(\d+\.\d+\.\d+)$/.match(Facter::Util::Resolution.exec('python -V 2>/dev/null'))[1] end end -- cgit v1.2.3