(self)
| 68 | return self.proxy_state_for_service(service)["Enabled"] == "Yes" |
| 69 | |
| 70 | def toggle_proxy(self): |
| 71 | new_state = not self.proxy_enabled_for_service(self.primary_service_name()) |
| 72 | for service_name in self.connected_service_names(): |
| 73 | if self.proxy_enabled_for_service(service_name) and not new_state: |
| 74 | self.disable_proxy_for_service(service_name) |
| 75 | elif not self.proxy_enabled_for_service(service_name) and new_state: |
| 76 | self.enable_proxy_for_service(service_name) |
| 77 | |
| 78 | def connected_service_names(self): |
| 79 | scutil_script = "list\n" |
no test coverage detected