File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -544,17 +544,21 @@ def check_command(c, cache):
544
544
cerr = ""
545
545
if c .cmd in ['has' , 'hasraw' , 'matches' , 'matchesraw' ]: # string test
546
546
regexp = c .cmd .startswith ('matches' )
547
- if len (c .args ) == 1 and not regexp and 'raw' not in c .cmd : # @has <path> = file existence
547
+
548
+ # @has <path> = file existence
549
+ if len (c .args ) == 1 and not regexp and 'raw' not in c .cmd :
548
550
try :
549
551
cache .get_file (c .args [0 ])
550
552
ret = True
551
553
except FailedCheck as err :
552
554
cerr = str (err )
553
555
ret = False
554
- elif len (c .args ) == 2 and 'raw' in c .cmd : # @hasraw/matchesraw <path> <pat> = string test
556
+ # @hasraw/matchesraw <path> <pat> = string test
557
+ elif len (c .args ) == 2 and 'raw' in c .cmd :
555
558
cerr = "`PATTERN` did not match"
556
559
ret = check_string (cache .get_file (c .args [0 ]), c .args [1 ], regexp )
557
- elif len (c .args ) == 3 and 'raw' not in c .cmd : # @has/matches <path> <pat> <match> = XML tree test
560
+ # @has/matches <path> <pat> <match> = XML tree test
561
+ elif len (c .args ) == 3 and 'raw' not in c .cmd :
558
562
cerr = "`XPATH PATTERN` did not match"
559
563
ret = get_nb_matching_elements (cache , c , regexp , True ) != 0
560
564
else :
You can’t perform that action at this time.
0 commit comments