diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-14 15:08:37 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-14 15:16:04 +0200 |
| commit | 5137d7ea3bf3356f917f6ccf44610cc23ea6492b (patch) | |
| tree | 2785f098bc0b390f307e1bd9f48901eb251ed491 /wrappers/python/eduvpn_common/main.py | |
| parent | ad01ccf4e59f632ead507646b10310e794b8f0c0 (diff) | |
Python: Run black
Diffstat (limited to 'wrappers/python/eduvpn_common/main.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index c48fce1..b581c5e 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -7,8 +7,7 @@ from eduvpn_common.event import EventHandler from eduvpn_common.loader import initialize_functions, load_lib from eduvpn_common.server import get_servers from eduvpn_common.state import State, StateType -from eduvpn_common.types import (VPNStateChange, decode_res, encode_args, - get_data_error) +from eduvpn_common.types import VPNStateChange, decode_res, encode_args, get_data_error class EduVPN(object): @@ -64,7 +63,11 @@ class EduVPN(object): raise Exception("Already registered") register_err = self.go_function( - self.lib.Register, self.config_directory, self.language, state_callback, debug + self.lib.Register, + self.config_directory, + self.language, + state_callback, + debug, ) if register_err: @@ -262,6 +265,7 @@ class EduVPN(object): return servers + eduvpn_objects: Dict[str, EduVPN] = {} @@ -273,7 +277,6 @@ def state_callback(name: bytes, old_state: int, new_state: int, data: Any): eduvpn_objects[name_decoded].callback(State(old_state), State(new_state), data) - def add_as_global_object(eduvpn: EduVPN) -> bool: global eduvpn_objects if eduvpn.name not in eduvpn_objects: @@ -285,4 +288,3 @@ def add_as_global_object(eduvpn: EduVPN) -> bool: def remove_as_global_object(eduvpn: EduVPN): global eduvpn_objects eduvpn_objects.pop(eduvpn.name, None) - |
