From 16d0002780bd8ab453f0fdf81835debe16c3d33f Mon Sep 17 00:00:00 2001 From: BlauFeuer Date: Fri, 3 Mar 2017 20:58:39 -0500 Subject: [PATCH] Move unreachable code after exception raise Also moves module import to top of file with comment. --- evennia/contrib/email_login.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evennia/contrib/email_login.py b/evennia/contrib/email_login.py index 0684e91514..5495361b60 100644 --- a/evennia/contrib/email_login.py +++ b/evennia/contrib/email_login.py @@ -40,6 +40,7 @@ from evennia.commands.cmdset import CmdSet from evennia.utils import create, logger, utils, ansi from evennia.commands.default.muxcommand import MuxCommand from evennia.commands.cmdhandler import CMD_LOGINSTART +from evennia.commands.default import unloggedin as default_unloggedin # Used in CmdUnconnectedCreate # limit symbol import for API __all__ = ("CmdUnconnectedConnect", "CmdUnconnectedCreate", @@ -118,7 +119,7 @@ class CmdUnconnectedConnect(MuxCommand): # actually do the login. This will call all hooks. session.sessionhandler.login(session, player) -from evennia.commands.default import unloggedin as default_unloggedin + class CmdUnconnectedCreate(MuxCommand): """ Create a new account. @@ -237,9 +238,10 @@ class CmdUnconnectedCreate(MuxCommand): # We are in the middle between logged in and -not, so we have # to handle tracebacks ourselves at this point. If we don't, # we won't see any errors at all. - raise - session.msg("%sAn error occurred. Please e-mail an admin if the problem persists.") + session.msg("An error occurred. Please e-mail an admin if the problem persists.") logger.log_trace() + raise + class CmdUnconnectedQuit(MuxCommand): """