From 0aede1a396aa6c5becb5990596fbc76aee2ea331 Mon Sep 17 00:00:00 2001 From: asmca Date: Tue, 17 Jun 2014 09:45:13 +0800 Subject: [PATCH] update variable name path, to path_str Avoid confusing on os.path and string path. orig. execution failed on my ENV:: python-2.7.1-7.fc15.i686 magpie-0.0.4-py2.7.egg just change the name and it now works. --- magpie/config/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magpie/config/__init__.py b/magpie/config/__init__.py index 36de1c7..dc00fc7 100644 --- a/magpie/config/__init__.py +++ b/magpie/config/__init__.py @@ -4,8 +4,8 @@ class ConfigPath(object): def __init__(self): self.config_paths = [path.join(path.expanduser('~'), '.magpie'), path.dirname(__file__)] def __getattr__(self, key): - for path in self.config_paths: - return_path = path.join(path, key + '.cfg') + for path_str in self.config_paths: + return_path = path.join(path_str, key + '.cfg') if path.exists(return_path): return return_path return None