Fix Python sys.path sniffing to work with Python 3

Python 3 wants parentheses around the args to print().
This commit is contained in:
Ilkka Laukkanen 2010-12-29 12:24:10 +02:00
parent 9c1e1753de
commit af86fe73ba
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ module Qwandry
end
# add python repositories:
python_paths = `python -c 'import sys;print \"\\n\".join(sys.path)'` rescue ''
python_paths = `python -c 'import sys;print(\"\\n\".join(sys.path))'` rescue ''
python_paths.split("\n").reject{|path| path == '' || path == '.' || path =~ /\.zip$/ || path =~/lib-dynload$/}.each do |path|
add :python, path, :class=>Qwandry::LibraryRepository, :reject => /\.(py[oc])|(egg-info)$/
end
@ -128,4 +128,4 @@ module Qwandry
end
end
end
end