From cc7aabc12ef51809a115a5b27634affc4379b49a Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 6 Jul 2017 15:31:17 +0200 Subject: Add bandit check to all python code Bandit was not running in all directories due missing -r parameter. Also, this change fix bandit errors. * Add nosec to subprocess module * Change /tmp/releases to .releases * Change /tmp/ to tmp/, tmp/ is not checked and in unittest is not an issue, simpler that mocking tempfile and make more complex tests. Change-Id: I42bafa4707a9a4d1faeb01cb9b5a843f56280deb --- tools/version-check.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/version-check.py b/tools/version-check.py index a4d7cbcd0..e9fc842cf 100755 --- a/tools/version-check.py +++ b/tools/version-check.py @@ -16,7 +16,7 @@ import argparse import logging import os import re -import subprocess +import subprocess # nosec import sys import yaml @@ -38,7 +38,7 @@ logging.basicConfig(level=logging.INFO) LOG = logging.getLogger(__name__) RELEASE_REPO = 'https://github.com/openstack/releases' -TARGET = '/tmp/releases' +TARGET = '.releases' SKIP_PROJECTS = { 'rally': 'Rally is not managed by openstack/releases project', @@ -60,7 +60,7 @@ def update_releases_repo(): else: cmd = ['git', '--git-dir', os.path.join(TARGET, '.git'), '--work-tree', TARGET, 'pull'] - subprocess.call(cmd) + subprocess.call(cmd) # nosec def get_default_branch(): -- cgit v1.2.3