summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/eduvpn_common')
-rw-r--r--wrappers/python/eduvpn_common/event.py6
-rw-r--r--wrappers/python/eduvpn_common/main.py4
-rw-r--r--wrappers/python/eduvpn_common/state.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/wrappers/python/eduvpn_common/event.py b/wrappers/python/eduvpn_common/event.py
index a47a0a7..f6260c5 100644
--- a/wrappers/python/eduvpn_common/event.py
+++ b/wrappers/python/eduvpn_common/event.py
@@ -105,6 +105,6 @@ class EventHandler(object):
converted = data
if convert:
converted = convert_data(self.lib, new_state, data)
- self.run_state(old_state, new_state, StateType.Leave, converted)
- self.run_state(new_state, old_state, StateType.Enter, converted)
- self.run_state(new_state, old_state, StateType.Wait, converted)
+ self.run_state(old_state, new_state, StateType.LEAVE, converted)
+ self.run_state(new_state, old_state, StateType.ENTER, converted)
+ self.run_state(new_state, old_state, StateType.WAIT, converted)
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index 7cb4b5e..f901ce7 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -49,12 +49,12 @@ class EduVPN(object):
self.profile_event: Optional[threading.Event] = None
self.location_event: Optional[threading.Event] = None
- @self.event.on(State.ASK_PROFILE, StateType.Wait)
+ @self.event.on(State.ASK_PROFILE, StateType.WAIT)
def wait_profile_event(old_state: int, profiles: str):
if self.profile_event:
self.profile_event.wait()
- @self.event.on(State.ASK_LOCATION, StateType.Wait)
+ @self.event.on(State.ASK_LOCATION, StateType.WAIT)
def wait_location_event(old_state: int, locations: str):
if self.location_event:
self.location_event.wait()
diff --git a/wrappers/python/eduvpn_common/state.py b/wrappers/python/eduvpn_common/state.py
index 5af004f..dfa04c9 100644
--- a/wrappers/python/eduvpn_common/state.py
+++ b/wrappers/python/eduvpn_common/state.py
@@ -2,9 +2,9 @@ from enum import IntEnum
class StateType(IntEnum):
- Enter = 1
- Leave = 2
- Wait = 3
+ ENTER = 1
+ LEAVE = 2
+ WAIT = 3
class State(IntEnum):