Skip to content

Commit cb09cf0

Browse files
committed
fix regex testing
1 parent f358ef2 commit cb09cf0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

msc-wis2node-management/msc_wis2node/publisher.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,13 @@ def identify(self, path: str) -> Union[dict, None]:
136136
LOGGER.debug('Found matching subtopic')
137137
match = True
138138

139-
LOGGER.debug('Matching any regexes')
140139
for regex in dataset.get('regexes', []):
141-
pass
140+
match = False
142141
LOGGER.debug(f'Testing regex match: {regex}')
143142
if re.search(regex, path) is not None:
144143
LOGGER.debug('Found matching regex')
145-
else:
146-
match = False
144+
match = True
145+
break
147146

148147
if match:
149148
LOGGER.debug('Found matching dataset definition')

0 commit comments

Comments
 (0)