chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: check return value of session_get_idle_hint
[elogind.git]
/
test
/
rule-syntax-check.py
diff --git
a/test/rule-syntax-check.py
b/test/rule-syntax-check.py
index 6cb021518d542bae24c874756e2cc3aa419c611b..4fa3042d4f29d84b8efc5dc7ccfe02d4307191cb 100755
(executable)
--- a/
test/rule-syntax-check.py
+++ b/
test/rule-syntax-check.py
@@
-27,8
+27,8
@@
if len(sys.argv) < 2:
no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
-no_args_assign = re.compile('(NAME|SYMLINK|
SYMLINK{unique}|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|RUN{ignore_error}
|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
-args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
+no_args_assign = re.compile('(NAME|SYMLINK|
OWNER|GROUP|MODE|TAG|PROGRAM|RUN
|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
+args_assign = re.compile('(ATTR|ENV|IMPORT
|RUN
){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
result = 0
buffer = ''
result = 0
buffer = ''
@@
-55,9
+55,9
@@
for path in sys.argv[1:]:
if not (no_args_tests.match(clause) or args_tests.match(clause) or
no_args_assign.match(clause) or args_assign.match(clause)):
if not (no_args_tests.match(clause) or args_tests.match(clause) or
no_args_assign.match(clause) or args_assign.match(clause)):
- print
'Invalid line %s:%i: %s' % (path, lineno, line)
- print
' clause:', clause
- print
+ print
('Invalid line %s:%i: %s' % (path, lineno, line))
+ print
(' clause:', clause)
+ print
()
result = 1
break
result = 1
break