[blivet] Use /usr/bin/python2 in scripts

David Shea dshea at redhat.com
Wed Feb 11 15:46:16 UTC 2015


On 02/09/2015 12:01 PM, Brian C. Lane wrote:
>
> And the check in runpylint.sh
>
> diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh
> index 18200bf..f410e26 100755
> --- a/tests/pylint/runpylint.sh
> +++ b/tests/pylint/runpylint.sh
> @@ -92,10 +92,10 @@ fi
>   # run pylint one file / module at a time, otherwise it sometimes gets
>   # confused
>   if [ -z "$FILES" ]; then
> -    # Test any file that either ends in .py or contains #!/usr/bin/python in
> +    # Test any file that either ends in .py or contains #!/usr/bin/python2 in
>       # the first line.  Scan everything except old_tests
>       FILES=$(findtestfiles \( -name '*.py' -o \
> -                -exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python'" \; \) -print | \
> +                -exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python2'" \; \) -print | \
>               egrep -v '(|/)doc/conf.py')
>   fi
>   
>

Can't we just leave that one alone? The test will work for both 2 and 3 
(and I assume pylint deals with both 2 and 3 though I'm honestly not 
super sure), and it's not like we're going have to deal with files that 
start with "#!/usr/bin/python-haha-just-kidding"


More information about the anaconda-patches mailing list