mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-21 17:56:45 +00:00
parent
477091207d
commit
65090c6f87
@ -483,11 +483,14 @@ class BaseManager:
|
|||||||
for filename in files:
|
for filename in files:
|
||||||
if filename[0] != "." and not filename.endswith(".md5sum"):
|
if filename[0] != "." and not filename.endswith(".md5sum"):
|
||||||
path = os.path.relpath(os.path.join(root, filename), img_dir)
|
path = os.path.relpath(os.path.join(root, filename), img_dir)
|
||||||
images.append({
|
try:
|
||||||
"filename": filename,
|
images.append({
|
||||||
"path": path,
|
"filename": filename,
|
||||||
"md5sum": md5sum(os.path.join(root, filename)),
|
"path": path,
|
||||||
"filesize": os.stat(os.path.join(root, filename)).st_size})
|
"md5sum": md5sum(os.path.join(root, filename)),
|
||||||
|
"filesize": os.stat(os.path.join(root, filename)).st_size})
|
||||||
|
except OSError as e:
|
||||||
|
log.warn("Can't add image {}: {}".format(path, str(e)))
|
||||||
return images
|
return images
|
||||||
|
|
||||||
def get_images_directory(self):
|
def get_images_directory(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user