Skip to content

Commit

Permalink
Merge pull request #313 from KlavsKlavsen/master
Browse files Browse the repository at this point in the history
Ubuntu 16.04 has a + in python -V output at the end of version.
  • Loading branch information
stankevich authored Jul 18, 2016
2 parents eefee8f + 0dc70cb commit 527164e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/facter/python_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def get_python_version(executable)
if Facter::Util::Resolution.which(executable)
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(/^.*(\d+\.\d+\.\d+)$/)
results = Facter::Util::Resolution.exec("#{executable} -V 2>&1").match(/^.*(\d+\.\d+\.\d+\+?)$/)
if results
results[1]
end
Expand Down

0 comments on commit 527164e

Please sign in to comment.