From 705710cfb8b5179fe42e031c856ccd3f771a1865 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 6 Oct 2012 12:06:09 +0200 Subject: [PATCH 1/1] explain why there is no strip() call for the value --- dsl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dsl.py b/dsl.py index d959b07..d14675f 100755 --- a/dsl.py +++ b/dsl.py @@ -26,8 +26,7 @@ def loadConfigFile(file): # parse line pos = line.index("=") # will raise exception when substring is not found curKey = line[:pos].strip() - value = line[pos+1:] - result[curKey] = shlex.split(value) + result[curKey] = shlex.split(line[pos+1:]) # shlex.split also strips except Exception: raise Exception("Invalid config, line %d: Error parsing line (quoting issue?)" % linenr) # add some convencience get functions -- 2.30.2