diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 5a59f13cb8..b7b009b2d6 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -105,11 +105,13 @@ with open('data/defaults.toml', 'rb') as f: vyos_defaults = tomli.load(f) # This is what we got from the build -with open('build/manifest.json', 'rb') as f: - manifest = json.load(f) +manifest_file = 'build/manifest.json' +if os.path.isfile(manifest_file): + with open('build/manifest.json', 'rb') as f: + manifest = json.load(f) -vyos_version = manifest['build_config']['version'] -vyos_codename = manifest['build_config']['release_train'] + vyos_version = manifest['build_config']['version'] + vyos_codename = manifest['build_config']['release_train'] class StreamToLogger(object): """ @@ -558,10 +560,11 @@ try: ################################################# c.sendline('lsb_release --short --id 2>/dev/null') c.expect('VyOS') - c.sendline('lsb_release --short --release 2>/dev/null') - c.expect(vyos_version) - c.sendline('lsb_release --short --codename 2>/dev/null') - c.expect(vyos_codename) + if os.path.isfile(manifest_file): + c.sendline('lsb_release --short --release 2>/dev/null') + c.expect(vyos_version) + c.sendline('lsb_release --short --codename 2>/dev/null') + c.expect(vyos_codename) # Ensure ephemeral key is loaded vyos_kernel_key = 'VyOS build time autogenerated kernel key'