From dcd14cb621959b4ea9230d6e6a168e263f894963 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 19 Apr 2014 17:13:37 +0200 Subject: [PATCH] Fixed objects-command zerodiv error with totally empty Object database. --- src/commands/default/system.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/default/system.py b/src/commands/default/system.py index bf7c62bc32..99ebe425a4 100644 --- a/src/commands/default/system.py +++ b/src/commands/default/system.py @@ -372,6 +372,8 @@ class CmdObjects(MuxCommand): nexits = ObjectDB.objects.filter(db_location__isnull=False, db_destination__isnull=False).count() nother = nobjs - nchars - nrooms - nexits + nobjs = nobjs or 1 # fix zero-div error with empty database + # total object sum table totaltable = EvTable("{wtype{n", "{wcomment{n", "{wcount{n", "{w%%{n", border="cells") totaltable.align = 'l'