Browse Source

More info in exception when downloaded file is not found
commit_hash:3452b7830e9949d5c55022ea82b982d3e7e040d0

pechatnov 2 months ago
parent
commit
b36c4920ee
1 changed files with 2 additions and 0 deletions
  1. 2 0
      build/scripts/fetch_from.py

+ 2 - 0
build/scripts/fetch_from.py

@@ -396,6 +396,8 @@ def process(fetched_file, file_name, args, remove=True):
             logging.info('Renaming %s to %s', src, dst)
             if os.path.exists(dst):
                 raise ResourceUnpackingError("Target file already exists ({} -> {})".format(src, dst))
+            if not os.path.exists(src):
+                raise ResourceUnpackingError("Source file does not exist ({} in {})".format(src, os.getcwd()))
             if remove:
                 rename_or_copy_and_remove(src, dst)
             else: