From 30c654459ff76ccbd05d4545621b1242353ff8ac Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 17 Apr 2020 23:26:06 +0200 Subject: [PATCH] Use ImportError for Python < 3.6 (Closes: !734) ModuleNotFoundError is a subclass of ImportError, so this should not change anything. --- fdroidserver/vmtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/vmtools.py b/fdroidserver/vmtools.py index 64d630e3..829d22ca 100644 --- a/fdroidserver/vmtools.py +++ b/fdroidserver/vmtools.py @@ -435,7 +435,7 @@ class LibvirtBuildVm(FDroidBuildVm): with libarchive.file_writer(output, 'gnutar', 'gzip') as tar: logging.debug('adding files to box %s ...', output) tar.add_files('metadata.json', 'Vagrantfile', 'box.img') - except (ModuleNotFoundError, AttributeError): + except (ImportError, AttributeError): with tarfile.open(output, 'w:gz') as tar: logging.debug('adding metadata.json to box %s ...', output) tar.add('metadata.json')