From 2879bb1ca705d42865bc71caed9186f153408dd7 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 16 Jun 2019 19:33:39 -0700 Subject: [PATCH] fixed incorrect path issue --- ci/ci_test.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ci/ci_test.py b/ci/ci_test.py index 0509f62..ee22710 100644 --- a/ci/ci_test.py +++ b/ci/ci_test.py @@ -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