explain why there is no strip() call for the value
authorRalf Jung <post@ralfj.de>
Sat, 6 Oct 2012 10:05:49 +0000 (12:05 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 6 Oct 2012 10:05:49 +0000 (12:05 +0200)
auto_debuild.py

index 5239e67903ae963656d4ebfd546f194d3873839d..7523e537117c824dde3d33fb0f944c35baa92f2f 100755 (executable)
@@ -54,8 +54,7 @@ def loadConfigFile(file):
                                        # option line
                                        pos = line.index("=") # will raise exception when substring is not found
                                        curKey = line[:pos].strip()
                                        # option 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
                        except Exception:
                                raise Exception("Invalid config, line %d: Error parsing line (quoting issue?)" % linenr)
        # add some convencience get functions