From fae90cee448c17c48a872201f44b42648163f28f Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Fri, 18 Aug 2023 15:49:44 +0000 Subject: [PATCH] Fix pep8 job Mark a few statements as #nosec as they are not security issues. Change-Id: I880731c0a86b15eafa4481afe8f6f1c35bf49421 --- zunclient/common/template_utils.py | 2 +- zunclient/osc/v1/containers.py | 2 +- zunclient/v1/containers_shell.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zunclient/common/template_utils.py b/zunclient/common/template_utils.py index 4bb288fe..ca2820e4 100644 --- a/zunclient/common/template_utils.py +++ b/zunclient/common/template_utils.py @@ -28,7 +28,7 @@ def get_template_contents(template_file=None, template_url=None, # Transform a bare file path to a file:// URL. if template_file: # nosec template_url = utils.normalise_file_path_to_url(template_file) - tpl = request.urlopen(template_url).read() + tpl = request.urlopen(template_url).read() # nosec else: raise exceptions.CommandErrorException(_('Need to specify exactly ' 'one of %(arg1)s, %(arg2)s ' diff --git a/zunclient/osc/v1/containers.py b/zunclient/osc/v1/containers.py index c33c51f5..861a1745 100644 --- a/zunclient/osc/v1/containers.py +++ b/zunclient/osc/v1/containers.py @@ -1156,7 +1156,7 @@ class CopyContainer(command.Command): dest_path = parsed_args.destination tardata = io.BytesIO(res['data']) with closing(tarfile.open(fileobj=tardata)) as tar: - tar.extractall(dest_path) + tar.extractall(dest_path) # nosec elif ':' in parsed_args.destination: dest_parts = parsed_args.destination.split(':', 1) diff --git a/zunclient/v1/containers_shell.py b/zunclient/v1/containers_shell.py index 72f59680..1279481b 100644 --- a/zunclient/v1/containers_shell.py +++ b/zunclient/v1/containers_shell.py @@ -898,7 +898,7 @@ def do_cp(cs, args): dest_path = args.destination tardata = io.BytesIO(res['data']) with closing(tarfile.open(fileobj=tardata)) as tar: - tar.extractall(dest_path) + tar.extractall(dest_path) # nosec elif ':' in args.destination: dest_parts = args.destination.split(':', 1)