MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _remove_unusable

Function _remove_unusable

pager_lib/getmac/getmac.py:1549–1561  ·  view source on GitHub ↗
(method, method_type)

Source from the content-addressed store, hash-verified

1547
1548
1549def _remove_unusable(method, method_type): # type: (Method, str) -> Optional[Method]
1550 if not FALLBACK_CACHE[method_type]:
1551 log.warning("No fallback method for unusable method '%s'!", str(method))
1552 METHOD_CACHE[method_type] = None
1553 else:
1554 METHOD_CACHE[method_type] = FALLBACK_CACHE[method_type].pop(0)
1555 log.warning(
1556 "Falling back to '%s' for unusable method '%s'",
1557 str(METHOD_CACHE[method_type]),
1558 str(method),
1559 )
1560
1561 return METHOD_CACHE[method_type]
1562
1563
1564def _attempt_method_get(

Callers 1

_attempt_method_getFunction · 0.85

Calls 2

warningMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected