X-Git-Url: https://git.ralfj.de/lilass.git/blobdiff_plain/48a8774e9e7fdbb87fbf4b8ff96c15dd5a69db46..a2c35fab467d689e7e06dbedc3e1821e6e5a429e:/dsl.py?ds=inline diff --git a/dsl.py b/dsl.py index d959b07..75f1cf2 100755 --- a/dsl.py +++ b/dsl.py @@ -1,5 +1,20 @@ #!/usr/bin/python # DSL - easy Display Setup for Laptops +# Copyright (C) 2012 Ralf Jung +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program (gpl.txt); if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import os, sys, re, subprocess from PyQt4 import QtGui @@ -26,8 +41,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