diff --git a/OutputCheck/CheckFileParser.py b/OutputCheck/CheckFileParser.py index 6cb04c9..6cd0e37 100644 --- a/OutputCheck/CheckFileParser.py +++ b/OutputCheck/CheckFileParser.py @@ -44,9 +44,9 @@ def __init__(self, checkPrefix, lineCommentPrefix): if getattr(object,'directiveToken',None) != None: # Found a match - directives.append( directive( Regex=re.compile(directivePrefix + - object.directiveToken() + - '\s*' + # Ignore all whitespace after directive + directives.append( directive( Regex=re.compile(directivePrefix + + object.directiveToken() + + r'\s*' + # Ignore all whitespace after directive patternRegex), Class=object ) diff --git a/OutputCheck/Driver.py b/OutputCheck/Driver.py index 0657989..a7e6338 100644 --- a/OutputCheck/Driver.py +++ b/OutputCheck/Driver.py @@ -34,7 +34,7 @@ def enum(*sequential, **named): def main(args): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('check_file', type=argparse.FileType('rU'), help='File containing check commands') + parser.add_argument('check_file', type=argparse.FileType('r'), help='File containing check commands') parser.add_argument('--file-to-check=', type=argparse.FileType('r'), default='-', help='File to check (default %(default)s)') parser.add_argument('--check-prefix=', default='CHECK', help='Prefix to use from check_file') parser.add_argument("-l","--log-level",type=str, default="INFO", choices=['debug','info','warning','error'])