Activate storage for the provided SSID (None => default).
(self, ssid: Optional[str])
| 35 | return self._build_context(self.active_ssid, self.active_slug or '') |
| 36 | |
| 37 | def activate_network(self, ssid: Optional[str]) -> Dict[str, str]: |
| 38 | """Activate storage for the provided SSID (None => default).""" |
| 39 | slug = self._slugify(ssid) |
| 40 | normalized_ssid = ssid.strip() if ssid else None |
| 41 | |
| 42 | if slug != self.active_slug or normalized_ssid != self.active_ssid: |
| 43 | self.active_slug = slug |
| 44 | self.active_ssid = normalized_ssid |
| 45 | self._write_last_ssid(normalized_ssid) |
| 46 | |
| 47 | return self._build_context(self.active_ssid, self.active_slug or '') |
| 48 | |
| 49 | def get_context_snapshot(self, ssid: Optional[str]) -> Dict[str, str]: |
| 50 | """Return a storage context for SSID without changing the active network.""" |
no test coverage detected