From 70ccbc87e9cb4f7b2db74034bc932e99cfa2dbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Mon, 25 Oct 2010 16:03:44 +0300 Subject: [PATCH] Fixed python fact to support older facter versions. --- python/lib/facter/python.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lib/facter/python.rb b/python/lib/facter/python.rb index f4f4cd9..3506f7e 100644 --- a/python/lib/facter/python.rb +++ b/python/lib/facter/python.rb @@ -5,7 +5,7 @@ Facter.add('pythonsitedir') do else pythonbin='python' end - Facter::Util::Resolution.exec("#{pythonbin} -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()'") + %x{#{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"}.chomp end end @@ -16,6 +16,6 @@ Facter.add('pythonversion') do else pythonbin='python' end - Facter::Util::Resolution.exec("#{pythonbin} -c 'import platform; print platform.python_version()'") + %x{#{pythonbin} -c "import platform; print platform.python_version()"}.chomp end end