diff options
Diffstat (limited to 'src/ogClient.py')
-rw-r--r-- | src/ogClient.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ogClient.py b/src/ogClient.py index abacc12..c30070c 100644 --- a/src/ogClient.py +++ b/src/ogClient.py @@ -16,6 +16,7 @@ from io import StringIO from src.restRequest import * from src.ogRest import * +from src.log import OgError from enum import Enum class State(Enum): @@ -31,7 +32,7 @@ class ogClient: self.mode = self.CONFIG['opengnsys']['mode'] if self.mode not in {'virtual', 'live', 'linux', 'windows'}: - raise ValueError(f'Invalid ogClient mode: {self.mode}.') + raise OgError(f'Invalid ogClient mode: {self.mode}.') if self.mode in {'linux', 'windows'}: self.event_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.event_sock.setblocking(0) @@ -190,4 +191,4 @@ class ogClient: message = event_sock.recv(4096).decode('utf-8').rstrip() self.send_event_hint(message) else: - raise ValueError(f'Invalid ogClient run state: {str(state)}.') + raise OgError(f'Invalid ogClient run state: {str(state)}.') |