From d001d250f06958201de2ab077fbfa8a287e36a50 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 5 Jan 2017 10:20:58 -0800 Subject: [PATCH] Whitelist the hacking/cherrypick script's use of python3 --- hacking/cherrypick.py | 2 +- test/sanity/code-smell/shebang.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hacking/cherrypick.py b/hacking/cherrypick.py index ad55dc84fe4..9a810101ddf 100755 --- a/hacking/cherrypick.py +++ b/hacking/cherrypick.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import os import sys diff --git a/test/sanity/code-smell/shebang.sh b/test/sanity/code-smell/shebang.sh index 9e473810505..ab195dd8219 100755 --- a/test/sanity/code-smell/shebang.sh +++ b/test/sanity/code-smell/shebang.sh @@ -7,12 +7,13 @@ grep '^#!' -rIn . \ -e '^\./lib/ansible/modules/' \ -e '^\./test/integration/targets/[^/]*/library/[^/]*:#!powershell$' \ -e '^\./test/sanity/validate-modules/validate-modules:#!/usr/bin/env python2$' \ + -e 'i^\./hacking/cherrypick.py:#!/usr/bin/env python3$' \ -e ':#!/bin/sh$' \ -e ':#!/bin/bash( -[eux]|$)' \ -e ':#!/usr/bin/make -f$' \ -e ':#!/usr/bin/env python$' \ -e ':#!/usr/bin/env bash$' \ - -e ':#!/usr/bin/env fish$' + -e ':#!/usr/bin/env fish$' \ if [ $? -ne 1 ]; then echo "One or more file(s) listed above have an unexpected shebang."