Fixed python fact to support older facter versions.
This commit is contained in:
parent
c4df2ba38d
commit
70ccbc87e9
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue