diff options
author | Volker Krause <vkrause@kde.org> | 2020-12-10 20:36:02 +0100 |
---|---|---|
committer | Volker Krause <vkrause@kde.org> | 2020-12-10 20:37:24 +0100 |
commit | f3a196c93ec3aab3de3ccbfa22c4f97b9a7c736d (patch) | |
tree | caa853f4198aa239514921427b9edc7faeff47f9 /toolchain | |
parent | 30728f107579f8706a4f3e644465d1bcc1a6504f (diff) | |
download | extra-cmake-modules-f3a196c93ec3aab3de3ccbfa22c4f97b9a7c736d.tar.gz extra-cmake-modules-f3a196c93ec3aab3de3ccbfa22c4f97b9a7c736d.tar.bz2 |
Check if file exists before removing the fastlane archive
Locally unlink() seems to work just fine on non-existent files, but on
binary factory that seems to be different for some reason.
Diffstat (limited to 'toolchain')
-rwxr-xr-x | toolchain/generate-fastlane-metadata.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toolchain/generate-fastlane-metadata.py b/toolchain/generate-fastlane-metadata.py index db09de74..fab6c23c 100755 --- a/toolchain/generate-fastlane-metadata.py +++ b/toolchain/generate-fastlane-metadata.py @@ -151,7 +151,8 @@ def downloadScreenshots(applicationName, data): def createMetadataArchive(applicationName): srcPath = os.path.join(arguments.output, 'metadata') zipFileName = os.path.join(srcPath, 'fastlane-' + applicationName + '.zip') - os.unlink(zipFileName) + if os.path.exists(zipFileName): + os.unlink(zipFileName) archive = zipfile.ZipFile(zipFileName, 'w') archive.write(os.path.join(srcPath, applicationName + '.yml'), applicationName + '.yml') |