Changed example.py to register first Xep_0030.

This a simple fix to prevent getting a key error as many plugins add
features to Xep_0030. A better fix would be to call pos_init after all
 plugins are loaded. An even better fix would be to define dependencies
for each plugin and registering on demand.
This commit is contained in:
Hernan E Grecco 2010-05-26 06:28:08 +08:00 committed by Nathan Fritz
parent f18c790824
commit 9cfe19c1e1

View file

@ -37,8 +37,8 @@ if __name__ == '__main__':
logging.basicConfig(level=opts.loglevel, format='%(levelname)-8s %(message)s') logging.basicConfig(level=opts.loglevel, format='%(levelname)-8s %(message)s')
xmpp = Example('user@gmail.com/sleekxmpp', 'password') xmpp = Example('user@gmail.com/sleekxmpp', 'password')
xmpp.registerPlugin('xep_0004')
xmpp.registerPlugin('xep_0030') xmpp.registerPlugin('xep_0030')
xmpp.registerPlugin('xep_0004')
xmpp.registerPlugin('xep_0060') xmpp.registerPlugin('xep_0060')
xmpp.registerPlugin('xep_0199') xmpp.registerPlugin('xep_0199')
if xmpp.connect(('talk.google.com', 5222)): if xmpp.connect(('talk.google.com', 5222)):