From 3a225f002ce2c99d32424c50a7690dd986034311 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 29 Dec 2010 00:18:05 -0500 Subject: [PATCH] bugfix in parseCommandLine() and parseTimeSpec(), tests passing --- Command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command.py b/Command.py index c9408c4..48ed9ad 100644 --- a/Command.py +++ b/Command.py @@ -27,7 +27,7 @@ class Command: timespec = parts[0].strip() if timespec[0] == '@': self.time = self.parseTimeSpec(timespec[1:]) - parts = parts[1:] + parts = parts[1].split(None, 1) if len(parts) == 1: command = parts[0].strip() rest = '' @@ -41,7 +41,7 @@ class Command: def parseTimeSpec(self, timespec): the_time = self.time - m = re.match('^(?:(\d{4})[-/])?(\d{1,2})[-/](\d{1,2}),(.*)$', timespec) + m = re.match('^(?:(\d{4})[-/])?(\d{1,2})[-/](\d{1,2}),(.+)$', timespec) if m is not None: # a date was given if m.group(1) is not None: