From 4d581a150158139f4d7775fef186864403db0b7a Mon Sep 17 00:00:00 2001 From: Mikhail Gordeev Date: Wed, 15 Apr 2020 23:12:56 +0300 Subject: [PATCH] Do not rely on args attributes --- cloud_build/cloud_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud_build/cloud_build.py b/cloud_build/cloud_build.py index 29cb4a8..1597826 100755 --- a/cloud_build/cloud_build.py +++ b/cloud_build/cloud_build.py @@ -24,7 +24,7 @@ class CB: def __init__(self, args: Any) -> None: self.parse_config(args.config) - self.args = args + self.no_tests = getattr(args, 'no_tests', False) data_dir = (Path(os.getenv('XDG_DATA_HOME', '~/.local/share')).expanduser() @@ -488,7 +488,7 @@ Dir::Etc::preferencesparts "/var/empty"; ) image_path = self.image_path(image, branch, arch, kind) self.copy_image(tarball, image_path) - if not self.args.no_tests: + if not self.no_tests: for test in self.tests_by_image(image): self.info(f'Test {image} {branch} {arch}') if not cloud_build.image_tests.test(