mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
fixed incorrect path issue
This commit is contained in:
parent
f20c48fb1c
commit
2879bb1ca7
1 changed files with 10 additions and 12 deletions
|
|
@ -14,23 +14,21 @@ def ci_config():
|
|||
logger.info("Migrating test config files...")
|
||||
config_dir = os.path.join(working_directory, "hyperglass/configuration/")
|
||||
test_files = glob.iglob(os.path.join(working_directory, "*.toml"))
|
||||
config_files = glob.iglob(os.path.join(config_dir, "*.toml"))
|
||||
logger.debug(config_dir)
|
||||
status = False
|
||||
for f in test_files:
|
||||
logger.debug(f)
|
||||
for f in config_files:
|
||||
if os.path.exists(f):
|
||||
logger.debug(f"{f} already exists")
|
||||
raise RuntimeError(f"{f} already exists")
|
||||
else:
|
||||
try:
|
||||
shutil.copy(f, config_dir)
|
||||
logger.info("Successfully migrated test config files")
|
||||
status = True
|
||||
logger.debug(status)
|
||||
return status
|
||||
except:
|
||||
logger.error(f"Failed to migrate {f}")
|
||||
raise
|
||||
for f in test_files:
|
||||
try:
|
||||
shutil.copy(f, config_dir)
|
||||
logger.info("Successfully migrated test config files")
|
||||
status = True
|
||||
except:
|
||||
logger.error(f"Failed to migrate {f}")
|
||||
raise
|
||||
return status
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue