diff options
| author | PMR <pmr@pmr-lander> | 2020-03-16 16:07:32 +0000 |
|---|---|---|
| committer | PMR <pmr@pmr-lander> | 2020-03-16 16:07:32 +0000 |
| commit | 092cfbab979808a3e8dadec16501be97a8ccdd4f (patch) | |
| tree | 1a8a79cb0363a6f1b6f3b00624b29110b392b9f4 /bin | |
| parent | 5e0bc581943e241ebf58f63d242f9b5eebd7a477 (diff) | |
| parent | b9f7481e8e7c5759a6f40699b302efdabfa0961b (diff) | |
Merge #380588 from ~rodsmith/plainbox-provider-checkbox:fix-lxd-test-3
Fix problems in LXD test caused by Python updates in Ubuntu 20.04, especially a failure of the test to run.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/virtualization | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/virtualization b/bin/virtualization index 487fba5..2b7cd54 100755 --- a/bin/virtualization +++ b/bin/virtualization @@ -27,7 +27,6 @@ from argparse import ArgumentParser import os import logging import lsb_release -import platform import requests import shlex from subprocess import ( @@ -224,7 +223,7 @@ class KVMTest(object): if self.qemu_config['cloudimg_type'] == CLOUD_IMAGE_TYPE_TAR: cloud_iso = "%s-server-cloudimg-%s.tar.gz" % ( self.release, self.qemu_config['cloudimg_arch']) - elif alt_pattern is "modern": + elif alt_pattern == "modern": # LP 1635345 - yakkety and beyond have a new naming scheme cloud_iso = "%s-server-cloudimg-%s.img" % ( self.release, self.qemu_config['cloudimg_arch']) @@ -253,7 +252,7 @@ class KVMTest(object): logging.error(" * Message: {}".format(e.with_traceback(None))) return False - if ret.status_code is not 200: + if ret.status_code != 200: return False else: return True @@ -561,7 +560,7 @@ class LXDTest(object): self.name = 'testbed' self.image_alias = uuid4().hex self.default_remote = "ubuntu:" - self.os_version = platform.linux_distribution()[1] + self.os_version = lsb_release.get_distro_information()["RELEASE"] def run_command(self, cmd): task = RunCommand(cmd) |
