mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 14:28:08 +00:00
Fix tests
This commit is contained in:
parent
c56a8ef8f7
commit
3804249d89
@ -289,8 +289,9 @@ class Controller:
|
|||||||
shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
|
shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
|
||||||
else:
|
else:
|
||||||
for entry in importlib_resources.files('gns3server.configs').iterdir():
|
for entry in importlib_resources.files('gns3server.configs').iterdir():
|
||||||
|
if entry.is_file():
|
||||||
full_path = os.path.join(dst_path, entry.name)
|
full_path = os.path.join(dst_path, entry.name)
|
||||||
if entry.is_file() and not os.path.exists(full_path):
|
if not os.path.exists(full_path):
|
||||||
log.debug(f"Installing base config file {entry.name} to {full_path}")
|
log.debug(f"Installing base config file {entry.name} to {full_path}")
|
||||||
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
|
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
@ -105,8 +105,9 @@ class ApplianceManager:
|
|||||||
shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
|
shutil.copy(os.path.join(resource_path, filename), os.path.join(dst_path, filename))
|
||||||
else:
|
else:
|
||||||
for entry in importlib_resources.files('gns3server.appliances').iterdir():
|
for entry in importlib_resources.files('gns3server.appliances').iterdir():
|
||||||
|
if entry.is_file():
|
||||||
full_path = os.path.join(dst_path, entry.name)
|
full_path = os.path.join(dst_path, entry.name)
|
||||||
if entry.is_file() and not os.path.exists(full_path):
|
if not os.path.exists(full_path):
|
||||||
log.debug(f"Installing built-in appliance file {entry.name} to {full_path}")
|
log.debug(f"Installing built-in appliance file {entry.name} to {full_path}")
|
||||||
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
|
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user