bugfix in parseCommandLine() and parseTimeSpec(), tests passing
This commit is contained in:
parent
ab0f265baa
commit
3a225f002c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user