Add releasenotes to check_exec list
Prevent addition of executable files in the releasenotes/notes directory. Change-Id: I80ac0b7fce7b16a453fe9139f0dacf88325af8e7
This commit is contained in:
parent
6dd6c74b38
commit
6460050c5c
0
releasenotes/notes/xiv-generic-volume-group-4609cdc86d6aaf81.yaml
Executable file → Normal file
0
releasenotes/notes/xiv-generic-volume-group-4609cdc86d6aaf81.yaml
Executable file → Normal file
@ -23,16 +23,17 @@ if len(sys.argv) < 2:
|
||||
print("Usage: %s <directory>" % sys.argv[0])
|
||||
sys.exit(1)
|
||||
|
||||
directory = sys.argv[1]
|
||||
directories = sys.argv[1:]
|
||||
|
||||
executable = []
|
||||
|
||||
for root, mydir, myfile in os.walk(directory):
|
||||
for f in myfile:
|
||||
path = os.path.join(root, f)
|
||||
mode = os.lstat(path).st_mode
|
||||
if stat.S_IXUSR & mode:
|
||||
executable.append(path)
|
||||
for d in directories:
|
||||
for root, mydir, myfile in os.walk(d):
|
||||
for f in myfile:
|
||||
path = os.path.join(root, f)
|
||||
mode = os.lstat(path).st_mode
|
||||
if stat.S_IXUSR & mode:
|
||||
executable.append(path)
|
||||
|
||||
if executable:
|
||||
print("Executable files found:")
|
||||
|
2
tox.ini
2
tox.ini
@ -57,7 +57,7 @@ setenv =
|
||||
commands =
|
||||
flake8 {posargs} .
|
||||
{toxinidir}/tools/config/check_uptodate.sh
|
||||
{toxinidir}/tools/check_exec.py {toxinidir}/cinder
|
||||
{toxinidir}/tools/check_exec.py {toxinidir}/cinder {toxinidir}/releasenotes/notes
|
||||
|
||||
[testenv:fast8]
|
||||
# Use same environment directory as pep8 env to save space and install time
|
||||
|
Loading…
Reference in New Issue
Block a user