From c6be83c16d605fb2e66b2a5a8ff0f4a7a6e0e1e4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Jan 2015 12:18:40 +0100 Subject: test/rule-syntax-check.py: Fix for Python 3 Make this work with both Python 2 and 3. --- test/rule-syntax-check.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py index ce4f5c75ad..8da38cd784 100755 --- a/test/rule-syntax-check.py +++ b/test/rule-syntax-check.py @@ -21,7 +21,7 @@ import re import sys if len(sys.argv) < 2: - print >> sys.stderr, 'Usage: %s [...]' % sys.argv[0] + sys.stderr.write('Usage: %s [...]\n' % sys.argv[0]) sys.exit(2) no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$') @@ -55,8 +55,8 @@ for path in sys.argv[1:]: no_args_assign.match(clause) or args_assign.match(clause)): print('Invalid line %s:%i: %s' % (path, lineno, line)) - print(' clause:', clause) - print() + print(' clause: %s' % clause) + print('') result = 1 break -- cgit v1.2.3-54-g00ecf