parser: fix bug in syntax checker on starred fields
authorKonstantin Stepanov <kstep@p-nut.info>
Mon, 20 Dec 2010 20:28:46 +0000 (22:28 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Mon, 20 Dec 2010 20:54:21 +0000 (22:54 +0200)
dbuscron/parser.py

index 8610f79..2365423 100644 (file)
@@ -107,7 +107,7 @@ class CrontabParser(object):
 
                     ruled = dict()
                     for i, f in enumerate(self.__fields):
-                        if self.__fields_chk[f]:
+                        if r[i] is not None and self.__fields_chk[f]:
                             if isinstance(self.__fields_chk[f], tuple):
                                 if r[i] not in self.__fields_chk[f]:
                                     raise CrontabParserError('Unexpected %s value' % (f.strip('_')), lineno,