diff options
Diffstat (limited to 'src/ogClient.py')
-rw-r--r-- | src/ogClient.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ogClient.py b/src/ogClient.py index b9f6a95..ff2c704 100644 --- a/src/ogClient.py +++ b/src/ogClient.py @@ -23,14 +23,19 @@ class State(Enum): FORCE_DISCONNECTED = 2 class ogClient: - def __init__(self, ip, port, mode): + def __init__(self, ip, port, mode, samba_config=None): if mode not in {'virtual', 'linux'}: raise ValueError('Mode not supported.') + if samba_config: + assert('user' in samba_config) + assert('pass' in samba_config) + self.ip = ip self.port = port self.mode = mode - self.ogrest = ogRest(self.mode) + self.samba_config = samba_config + self.ogrest = ogRest(self.mode, self.samba_config) def get_socket(self): return self.sock |