From 0dc70cb05d2ec3cd1aaf1ca5f1c92ff014fd755b Mon Sep 17 00:00:00 2001 From: Klavs Klavsen Date: Sat, 9 Jul 2016 22:15:18 +0200 Subject: [PATCH] Ubuntu 16.04 has a + in python -V output at the end of version. --- 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 8fe91636..c4ffa45c 100644 --- a/lib/facter/python_version.rb +++ b/lib/facter/python_version.rb @@ -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