From a27649d6751c8e15111d3e391725419af41ccd16 Mon Sep 17 00:00:00 2001 From: kalyanvasudev Date: Sat, 22 Jun 2019 14:22:06 -0400 Subject: [PATCH] fixed config file parsing bug --- src/pyrobot/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyrobot/core.py b/src/pyrobot/core.py index ac39ae13..6e6b67f8 100644 --- a/src/pyrobot/core.py +++ b/src/pyrobot/core.py @@ -72,8 +72,8 @@ def __init__(self, cfg_path = os.path.join(root_path, 'cfg') robot_pool = [] for f in os.listdir(cfg_path): - if '_config.py' in f: - robot_pool.append(f.strip('_config.py')) + if f.endswith('_config.py'): + robot_pool.append(f[:-len('_config.py')]) root_node = 'pyrobot.' self.configs = None this_robot = None