mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-08-18 04:10:10 +02:00
Merge branch 'fix_import_error' into 'master'
Use ImportError for Python < 3.6 (Closes: !734) See merge request fdroid/fdroidserver!739
This commit is contained in:
commit
bb43dcf00e
@ -435,7 +435,7 @@ class LibvirtBuildVm(FDroidBuildVm):
|
|||||||
with libarchive.file_writer(output, 'gnutar', 'gzip') as tar:
|
with libarchive.file_writer(output, 'gnutar', 'gzip') as tar:
|
||||||
logging.debug('adding files to box %s ...', output)
|
logging.debug('adding files to box %s ...', output)
|
||||||
tar.add_files('metadata.json', 'Vagrantfile', 'box.img')
|
tar.add_files('metadata.json', 'Vagrantfile', 'box.img')
|
||||||
except (ModuleNotFoundError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
with tarfile.open(output, 'w:gz') as tar:
|
with tarfile.open(output, 'w:gz') as tar:
|
||||||
logging.debug('adding metadata.json to box %s ...', output)
|
logging.debug('adding metadata.json to box %s ...', output)
|
||||||
tar.add('metadata.json')
|
tar.add('metadata.json')
|
||||||
|
Loading…
Reference in New Issue
Block a user