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

Method _sanitize_interface_name

multi_interface.py:493–501  ·  view source on GitHub ↗
(self, value: Optional[str])

Source from the content-addressed store, hash-verified

491 # Helpers
492 # ------------------------------------------------------------------
493 def _sanitize_interface_name(self, value: Optional[str]) -> Optional[str]:
494 if value is None:
495 return None
496 candidate = str(value).strip()
497 if not candidate:
498 return None
499 if not self._iface_pattern.match(candidate):
500 raise ValueError('Invalid interface name')
501 return candidate
502
503 def _auto_focus_interface(self) -> Optional[str]:
504 default_iface = self._default_iface

Callers 1

update_scan_modeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected