mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Do not cache to md5sum file in some situations
This commit is contained in:
1 parent
e6c8144210
commit
3106c8a6a2
5 files changed
+26
-20
No files matched your search
@@ -153,8 +153,14 @@ class ApplianceManager:
|
||||
version_images[appliance_key] = image_in_db.filename
|
||||
else:
|
||||
# check if the image is on disk
|
||||
# FIXME: still necessary? the image should have been discovered and saved in the db already
|
||||
image_path = os.path.join(image_dir, appliance_file)
|
||||
if os.path.exists(image_path) and await wait_run_in_executor(md5sum, image_path) == image_checksum:
|
||||
if os.path.exists(image_path) and \
|
||||
await wait_run_in_executor(
|
||||
md5sum,
|
||||
image_path,
|
||||
cache_to_md5file=False
|
||||
) == image_checksum:
|
||||
async with aiofiles.open(image_path, "rb") as f:
|
||||
await write_image(appliance_file, image_path, f, images_repo)
|
||||
else:
|
||||
|
||||
@@ -630,9 +630,6 @@ class Compute:
|
||||
|
||||
try:
|
||||
if type in ["qemu", "dynamips", "iou"]:
|
||||
# for local_image in list_images(type):
|
||||
# if local_image['filename'] not in [i['filename'] for i in images]:
|
||||
# images.append(local_image)
|
||||
images = sorted(images, key=itemgetter("filename"))
|
||||
else:
|
||||
images = sorted(images, key=itemgetter("image"))
|
||||
|
||||
Reference in new issue
Block a user