From 4fa5e1a44230ccc9ac17001c89c95dcb1241cf74 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Thu, 28 Aug 2008 14:20:52 +0100 Subject: [PATCH] Remove some leftovers. --- terminatorlib/configfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/terminatorlib/configfile.py b/terminatorlib/configfile.py index 3d4ab7f3..01272ef5 100644 --- a/terminatorlib/configfile.py +++ b/terminatorlib/configfile.py @@ -20,8 +20,8 @@ QuotedStrings = {"'": re.compile(r"'([^'\r\n]*)'"), '"': re.compile(r'"([^"\r\n] Section = re.compile(r"\[([^\r\n\]]+)\][ \f\t]*") Setting = re.compile(r"(\w+)\s*=\s*") -PaletteColours = '(?:(?:#[0-9a-fA-F]{12}:){15}#[0-9a-fA-F]{12})' -SingleColour = '(?:#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3})' +PaletteColours = '(?:#[0-9a-fA-F]{12}:){15}#[0-9a-fA-F]{12}' +SingleColour = '#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}' Colourvalue = re.compile(group(PaletteColours, SingleColour)) Barevalue = re.compile(r'((?:[^\r\n# \f\t]+|[^\r\n#]+(?!' + Ignore.pattern +'))+)') @@ -167,8 +167,7 @@ class ConfigFile: self._currvalue = value def _line_ok(self): - section, setting, value = self._currsection, self._currsetting, self._currvalue - if value is None: return + if self._currvalue is None: return else: try: self.callback(self._currsection, self._currsetting, self._currvalue)