diff options
| author | troido <troido@hotmail.com> | 2017-11-01 12:41:38 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2017-11-01 12:41:38 +0100 |
| commit | 1febf9663915304f9036acb23c0b6fe379c0f955 (patch) | |
| tree | 524ce558e1c9386b98cead79e638ac84531d39e3 /asciifarm/client/start.py | |
| parent | bcc306d36d639b0282c13ba25d187a22fb5e1d9f (diff) | |
messages can now be logged to a file
Diffstat (limited to 'asciifarm/client/start.py')
| -rw-r--r-- | asciifarm/client/start.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asciifarm/client/start.py b/asciifarm/client/start.py index 4084f7f..e9d3ce7 100644 --- a/asciifarm/client/start.py +++ b/asciifarm/client/start.py @@ -14,7 +14,7 @@ defaultAdresses = { "inet": "localhost:9021", } -def main(name, socketType, address, keybindings, characters, colours=False): +def main(name, socketType, address, keybindings, characters, colours=False, logfile=None): connection = Connection(socketType) try: @@ -27,13 +27,13 @@ def main(name, socketType, address, keybindings, characters, colours=False): def start(stdscr): display = Display(stdscr, characters, colours) - client = Client(stdscr, display, name, connection, keybindings) + client = Client(stdscr, display, name, connection, keybindings, logfile) nonlocal caught_ctrl_c try: client.start() except KeyboardInterrupt: - caught_ctrl_c = True client.keepAlive = False + caught_ctrl_c = True curses.wrapper(start) |
