summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-04-24 11:05:37 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-08-26 13:37:50 -0700
commit8ba60847b60ee312a99df4b7f992d9801fbf9aee (patch)
tree7b53ec248d9795b2a9506b1bebc0b7421cd7c4a8
parent6358ee91286d71a0b3babfd85f659b9f7cf7215b (diff)
downloadohai-8ba60847b60ee312a99df4b7f992d9801fbf9aee.tar.gz
Encapsulate print command in function
Necessary for Python 3.2.x, tested to still work on Python 2.4.x on CentOS 5. Also closes #56
-rw-r--r--lib/ohai/plugins/python.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/python.rb b/lib/ohai/plugins/python.rb
index 683042ba..c6c4dfc8 100644
--- a/lib/ohai/plugins/python.rb
+++ b/lib/ohai/plugins/python.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@ Ohai.plugin(:Python) do
python = Mash.new
- so = shell_out("python -c \"import sys; print sys.version\"")
+ so = shell_out("python -c \"import sys; print (sys.version)\"")
if so.exitstatus == 0
output = so.stdout.split