Do not rely on args attributes

This commit is contained in:
Mikhail Gordeev 2020-04-15 23:12:56 +03:00
parent 0f19ea0bd5
commit 4d581a1501

View File

@ -24,7 +24,7 @@ class CB:
def __init__(self, args: Any) -> None: def __init__(self, args: Any) -> None:
self.parse_config(args.config) self.parse_config(args.config)
self.args = args self.no_tests = getattr(args, 'no_tests', False)
data_dir = (Path(os.getenv('XDG_DATA_HOME', data_dir = (Path(os.getenv('XDG_DATA_HOME',
'~/.local/share')).expanduser() '~/.local/share')).expanduser()
@ -488,7 +488,7 @@ Dir::Etc::preferencesparts "/var/empty";
) )
image_path = self.image_path(image, branch, arch, kind) image_path = self.image_path(image, branch, arch, kind)
self.copy_image(tarball, image_path) 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): for test in self.tests_by_image(image):
self.info(f'Test {image} {branch} {arch}') self.info(f'Test {image} {branch} {arch}')
if not cloud_build.image_tests.test( if not cloud_build.image_tests.test(