diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-20 12:18:40 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-20 12:18:40 +0100 |
commit | c6be83c16d605fb2e66b2a5a8ff0f4a7a6e0e1e4 (patch) | |
tree | 406325ec6b8b90dd055fe1d4569df29e9e9b6cb6 /test/rule-syntax-check.py | |
parent | 6fb2f9ab6bd7f6039cf98659d939e865e230b3ea (diff) |
test/rule-syntax-check.py: Fix for Python 3
Make this work with both Python 2 and 3.
Diffstat (limited to 'test/rule-syntax-check.py')
-rwxr-xr-x | test/rule-syntax-check.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 <rules file> [...]' % sys.argv[0] + sys.stderr.write('Usage: %s <rules file> [...]\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 |