From 5f361fbd5ba71c3ee7ea71caeb3351549416e665 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 14 Nov 2020 19:15:24 +0100 Subject: [PATCH 1/3] Customize index set --- docs/deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/deploy.sh b/docs/deploy.sh index 0815e06885..d2f11022ba 100644 --- a/docs/deploy.sh +++ b/docs/deploy.sh @@ -21,6 +21,7 @@ ls -Q | grep -v build | xargs rm -Rf cp -Rf build/html/* . # TODO automate this? ln -s 0.9.5 latest +ln -s 0.9.5/index.html . # docs/build is in .gitignore so will not be included git add . From 679376a13f47323294f196447a30e08db3289c67 Mon Sep 17 00:00:00 2001 From: "Kevin C. Coram" Date: Tue, 17 Nov 2020 15:06:19 +0000 Subject: [PATCH 2/3] Add null checking when getting puppet from session When account.execute_cmd() is called without an explicit session argument for a server using MULTISESSION_MODE 2 or 3, it does not know which session to use and may leave it None. Downstream, code attempting to get the puppet from the session can fail with an error because of the None session. This change adds in checking for the None session, and sets the puppet to None if there is no session defined. --- evennia/accounts/accounts.py | 2 +- evennia/commands/default/account.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index 8bf324c898..79631881db 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -373,7 +373,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): puppet (Object): The matching puppeted object, if any. """ - return session.puppet + return session.puppet if session else None def get_all_puppets(self): """ diff --git a/evennia/commands/default/account.py b/evennia/commands/default/account.py index ae284a6c85..b54f99f8a5 100644 --- a/evennia/commands/default/account.py +++ b/evennia/commands/default/account.py @@ -999,7 +999,7 @@ class CmdQuell(COMMAND_DEFAULT_CLASS): self.msg("Already quelling Account %s permissions." % permstr) return account.attributes.add("_quell", True) - puppet = self.session.puppet + puppet = self.session.puppet if self.session else None if puppet: cpermstr = "(%s)" % ", ".join(puppet.permissions.all()) cpermstr = "Quelling to current puppet's permissions %s." % cpermstr From a9c245fda91dc9a679889dc1fa19ecd686e71cc2 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 9 Dec 2020 16:45:39 +0100 Subject: [PATCH 3/3] Fix django-extensions add --- evennia/settings_default.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/settings_default.py b/evennia/settings_default.py index ac00b18b29..f44778face 100644 --- a/evennia/settings_default.py +++ b/evennia/settings_default.py @@ -980,7 +980,7 @@ MESSAGE_TAGS = {messages.ERROR: "danger"} try: import django_extensions # noqa - INSTALLED_APPS = INSTALLED_APPS.append("django_extensions") + INSTALLED_APPS += ["django_extensions"] except ImportError: # Django extensions are not installed in all distros. pass