summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-07-16 23:26:02 +1200
committerFlorian Baumann <derflob@derflob.de>2016-07-16 23:26:02 +1200
commit3502c32228a3223fb3bf67c9b0b526cc094ddfbf (patch)
tree39a1fe17fe0639ed3733f6cf05441beecb4ff84e
parentb0abfc6cf6a093704dfb97e63f733d7852106587 (diff)
downloadxmpp-3502c32228a3223fb3bf67c9b0b526cc094ddfbf.tar.gz
xmpp-3502c32228a3223fb3bf67c9b0b526cc094ddfbf.tar.bz2
use dir instead of __dict__
-rw-r--r--__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py
index f1eae7c..d2c911e 100644
--- a/__init__.py
+++ b/__init__.py
@@ -348,7 +348,8 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
lines = []
if (len(cmd) == 0 or cmd[0] == 'all'):
lines.append("Available commands:")
- for (attr, fn) in self.__dict__.items():
+ for attr in dir(self):
+ fn = getattr(self, attr)
if (hasattr(fn, 'xmpp_cmd') and not fn.hidden):
lines.append("{} - {}".format(fn.xmpp_cmd, fn.usage))
if (fn.desc):