Merge pull request #129 from kiwix/no_fail_on_dir_exist

Do not fail if we try to create an existing directory.
This commit is contained in:
Matthieu Gautier 2018-03-19 14:19:30 +01:00 committed by GitHub
commit e8c220c17d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -84,7 +84,10 @@ def make_archive(project, platform):
archive_dir = NIGHTLY_ARCHIVES_DIR
archive_name = "{}_{}-{}".format(project, platform, postfix)
archive = archive_dir/'{}.tar.gz'.format(archive_name)
try:
archive_dir.mkdir(parents=True)
except FileExistsError:
pass
base_bin_dir = BASE_DIR/'INSTALL'/'bin'
with tarfile.open(str(archive), 'w:gz') as arch:
for f in file_to_archives: