From 4f03c31f85b6431f5be70f28b08665560f76d654 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gomez Date: Wed, 8 Apr 2020 13:31:45 +0200 Subject: Add mode selection for ogClient --- src/ogClient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ogClient.py') diff --git a/src/ogClient.py b/src/ogClient.py index 5c7706c..3e6a0e4 100644 --- a/src/ogClient.py +++ b/src/ogClient.py @@ -23,10 +23,14 @@ class State(Enum): FORCE_DISCONNECTED = 2 class ogClient: - def __init__(self, ip, port): + def __init__(self, ip, port, mode): + if mode not in {'virtual', 'linux'}: + raise ValueError('Mode not supported.') + self.ip = ip self.port = port - self.ogrest = ogRest() + self.mode = mode + self.ogrest = ogRest(self.mode) def get_socket(self): return self.sock -- cgit v1.2.3-18-g5258