@@ -198,18 +198,18 @@ def _is_allowed(self, rules, key, node):
198198
199199 for item in base [key ]:
200200 if item in deny :
201- print (f"rules{ key } : { key .capitalize ()} { item } not allowed due { deny } " )
201+ print (f"rules[ { key } ] : { key .capitalize ()} { item } not allowed due ! { deny } " )
202202 return False
203203 if item in allow :
204204 found = True
205205
206206 if not found :
207- print (f"rules: { key .capitalize ()} missing one of { allow } " )
207+ print (f"rules[ { key } ] : { key .capitalize ()} missing one of { allow } " )
208208 return False
209209
210210 else :
211211 if base [key ] in deny or (len (allow ) > 0 and base [key ] not in allow ):
212- print (f"rule [{ key } ]: { key .capitalize ()} { base [key ]} not allowed due { deny } " )
212+ print (f"rules [{ key } ]: { key .capitalize ()} { base [key ]} not allowed due ! { deny } " )
213213 return False
214214
215215 return True
@@ -290,20 +290,20 @@ def _is_tree_branch_allowed(self, node, rules):
290290 break
291291 match = self ._match_combos (node , deny_combos )
292292 if match :
293- print (f"Tree/branch combination "
293+ print (f"rules[ { key } ]: Tree/branch combination "
294294 f"{ match ['tree' ]} /{ match ['branch' ]} not allowed" )
295295 return False
296296
297297 # Get back to regular allow/deny list processing
298298 if node [key ] in deny :
299- print (f"{ key .capitalize ()} { node [key ]} not allowed due { deny } " )
299+ print (f"rules[ { key } ]: { key .capitalize ()} { node [key ]} not allowed due ! { deny } " )
300300 return False
301301 if (len (allow ) == 0 and len (allow_combos ) > 0 ):
302- print (f"{ key .capitalize ()} { node [key ]} not allowed due"
302+ print (f"rules[ { key } ]: { key .capitalize ()} { node [key ]} not allowed due"
303303 f" to tree/branch rules" )
304304 return False
305305 if (len (allow ) > 0 and node [key ] not in allow ):
306- print (f"{ key .capitalize ()} { node [key ]} not allowed due { allow } " )
306+ print (f"rules[ { key } ]: { key .capitalize ()} { node [key ]} not allowed due { allow } " )
307307 return False
308308
309309 return True
@@ -392,13 +392,13 @@ def should_create_node(self, rules, node):
392392 if (key .startswith ('min' ) and
393393 ((major < rule_major ) or
394394 (major == rule_major and minor < rule_minor ))):
395- print (f"rules: Version { major } .{ minor } older than minimum version "
395+ print (f"rules[ { key } ] : Version { major } .{ minor } older than minimum version "
396396 f"({ rule_major } .{ rule_minor } )" )
397397 return False
398398 if (key .startswith ('max' ) and
399399 ((major > rule_major ) or
400400 (major == rule_major and minor > rule_minor ))):
401- print (f"rules: Version { major } .{ minor } more recent than maximum version "
401+ print (f"rules[ { key } ] : Version { major } .{ minor } newer than maximum version "
402402 f"({ rule_major } .{ rule_minor } )" )
403403 return False
404404
0 commit comments