summaryrefslogtreecommitdiffstats
path: root/src/ogClient.py
diff options
context:
space:
mode:
authorRoberto Hueso Gomez <robertohueso96@gmail.com>2020-04-08 13:31:45 +0200
committerRoberto Hueso Gomez <robertohueso96@gmail.com>2020-04-08 13:31:45 +0200
commit4f03c31f85b6431f5be70f28b08665560f76d654 (patch)
tree42afcd3efe20d5329179532e4b8d87f0bdabf3e0 /src/ogClient.py
parent99ae598fbd9addc92b4150e7fcc668d8f0269c18 (diff)
Add mode selection for ogClient
Diffstat (limited to 'src/ogClient.py')
-rw-r--r--src/ogClient.py8
1 files changed, 6 insertions, 2 deletions
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