diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-07-05 04:13:33 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-07-05 04:13:33 +0200 |
commit | 2357a6077f3a6ffe3988210a0b3d3528ac93534e (patch) | |
tree | 10963f7a98bb3baf74918aba4e7eb12e5f09cd6c | |
parent | f6facfb4193a582b94fa884f4bd2c4b70c862250 (diff) | |
download | portato-2357a6077f3a6ffe3988210a0b3d3528ac93534e.tar.gz portato-2357a6077f3a6ffe3988210a0b3d3528ac93534e.tar.bz2 portato-2357a6077f3a6ffe3988210a0b3d3528ac93534e.zip |
Allow ':' in expression names. Thus removing the colon as an assignment operator
Diffstat (limited to '')
-rw-r--r-- | etc/portato.cfg | 2 | ||||
-rw-r--r-- | portato/config_parser.py | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/etc/portato.cfg b/etc/portato.cfg index 6d5d79f..2429dc7 100644 --- a/etc/portato.cfg +++ b/etc/portato.cfg @@ -10,7 +10,7 @@ # # Comments are single-line only and are started with a '#' or a ';'. # -# Values can be assigned to options via a '=' or ':' - so "option = value" is the same as "option : value" +# Values can be assigned to options via a '=' # # diff --git a/portato/config_parser.py b/portato/config_parser.py index cbf993f..39234a9 100644 --- a/portato/config_parser.py +++ b/portato/config_parser.py @@ -19,9 +19,6 @@ Thus it keeps comments and structuring of the file. :Variables: - DELIMITER : string[] - list of delimiters allowed - COMMENT : string [] comment marks allowed @@ -48,14 +45,13 @@ from threading import Lock from .helper import debug, error -DELIMITER = ["=", ":"] COMMENT = [";","#"] # precompiled expressions TRUE = re.compile("((true)|(1)|(on)|(wahr)|(ja)|(yes))", re.I) FALSE = re.compile("((false)|(0)|(off)|(falsch)|(nein)|(no))", re.I) SECTION = re.compile("\s*\[(?P<name>\w(\w|[-_])*)\]\s*") -EXPRESSION = re.compile(r"\s*(?P<key>\w(\w|[-_])*)\s*[:=]\s*(?P<value>.*)\s*") +EXPRESSION = re.compile(r"\s*(?P<key>\w(\w|[-_:])*)\s*=\s*(?P<value>.*)\s*") class KeyNotFoundException (KeyError): """ |