diff options
Diffstat (limited to 'asciifarm/client/gameclient.py')
| -rw-r--r-- | asciifarm/client/gameclient.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/asciifarm/client/gameclient.py b/asciifarm/client/gameclient.py index 9ba4b37..914d90c 100644 --- a/asciifarm/client/gameclient.py +++ b/asciifarm/client/gameclient.py @@ -13,11 +13,12 @@ import string from .display.display import Display import hy +from . import keybindings as defaultkeybindings import importlib class Client: - def __init__(self, stdscr, display, name, connection, keybindings, logFile=None): + def __init__(self, stdscr, display, name, connection, keybindings=None, logFile=None): self.stdscr = stdscr self.display = display self.name = name @@ -25,8 +26,9 @@ class Client: self.connection = connection self.logFile = logFile - - keymodule = importlib.import_module(".keybindings", __package__) + keymodule = defaultkeybindings + if keybindings: + keymodule = importlib.import_module(keybindings) self.commands = keymodule.commands self.controlsString = keymodule.docs |
