From 614a3bf7ac7494b92560f0e3c03aa36e48c32029 Mon Sep 17 00:00:00 2001 From: Mate Soos Date: Sat, 3 Aug 2024 00:02:30 +0200 Subject: [PATCH 1/2] Fixing up to python3 --- OutputCheck/Driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']) From 3232d0937dcabf59df7ceb776f27b4d5cff6194d Mon Sep 17 00:00:00 2001 From: Mate Soos Date: Sat, 3 Aug 2024 00:24:21 +0200 Subject: [PATCH 2/2] Fixing this too --- OutputCheck/CheckFileParser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 )