From 9a45580f9ece760da981fef0b10aab804ad13a4f Mon Sep 17 00:00:00 2001 From: Andrew Bastien Date: Mon, 27 Jan 2020 12:33:03 -0500 Subject: [PATCH] Fixing error with Command.client_width() --- evennia/commands/command.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/commands/command.py b/evennia/commands/command.py index d399769bd6..e2fff2f857 100644 --- a/evennia/commands/command.py +++ b/evennia/commands/command.py @@ -502,13 +502,13 @@ Command {self} has no defined `func()` - showing on-command variables: Get the client screenwidth for the session using this command. Returns: - client width (int or None): The width (in characters) of the client window. None - if this command is run without a Session (such as by an NPC). + client width (int): The width (in characters) of the client window. """ if self.session: return self.session.protocol_flags.get( - "SCREENWIDTH", (settings.CLIENT_DEFAULT_WIDTH, ))[0] + "SCREENWIDTH", {0: settings.CLIENT_DEFAULT_WIDTH})[0] + return settings.CLIENT_DEFAULT_WIDTH def styled_table(self, *args, **kwargs): """