diff options
author | Nikolay Zamotaev <nzamotaev@luxoft.com> | 2020-02-04 18:07:38 +0300 |
---|---|---|
committer | Nikolay Zamotaev <nzamotaev@luxoft.com> | 2020-02-14 14:12:15 +0000 |
commit | df22adb35d188afe7eb7424ba9c3c055e55c3566 (patch) | |
tree | 8ee5e8e3363635d3e493cdfd4178c818f602ab10 | |
parent | d3199f15e5919dbaefbb3e1fab1520c67f595193 (diff) |
File path cleanup in 'missing file' error message
Change-Id: I34138d2b288f577b726a7b79178e7245ec02671f
Fixes: AUTOSUITE-1451
Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
(cherry picked from commit a7bb59eaaefa59f17e0c29fc8371b84cf24f0aa5)
Reviewed-by: Nikolay Zamotaev <nzamotaev@luxoft.com>
-rw-r--r-- | store/api.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/store/api.py b/store/api.py index 04f6daf..003d467 100644 --- a/store/api.py +++ b/store/api.py @@ -282,7 +282,13 @@ def appPurchase(request): pkgdata = parsePackageMetadata(package) addSignatureToPackage(fromFilePath, toPath + toFile, pkgdata['rawDigest'], deviceId) else: - shutil.copyfile(fromFilePath, toPath + toFile) + try: + shutil.copyfile(fromFilePath, toPath + toFile) + except Exception as error: + if type(error) == IOError: + raise IOError(error.args[0],error.args[1], os.path.basename(fromFilePath)) + else: + raise error if settings.URL_PREFIX != '': downloadUri = '/' + settings.URL_PREFIX + '/app/download/' + toFile |