# HG changeset patch # User Ralph Meijer # Date 1156769060 0 # Node ID 6250905b72f69de7619cd898d9bf379f6ddd95c8 # Parent 5191ba7c4df891415b688f015b18bec7b6972547 Fix spacing errors. Do 0.5.0 release. diff -r 5191ba7c4df8 -r 6250905b72f6 README --- a/README Mon Aug 21 16:05:35 2006 +0000 +++ b/README Mon Aug 28 12:44:20 2006 +0000 @@ -3,10 +3,10 @@ What is this? ================ - Idavoll is a Jabber publish-subscribe service component, as defined in - JEP-0060, aiming to be fully compliant and mostly complete. The goal is to - build a generic pubsub service, but of which parts can be reused for - building custom pubsub services for specific applications. +Idavoll is a Jabber publish-subscribe service component, as defined in +JEP-0060, aiming to be fully compliant and mostly complete. The goal is to +build a generic pubsub service, but of which parts can be reused for building +custom pubsub services for specific applications. Current Status ============== @@ -20,16 +20,16 @@ Installing ========== - Instructions for installing, configuring and running this software are in - INSTALL. +Instructions for installing, configuring and running this software are in +INSTALL. Copyright ========= - All of the code in this distribution is Copyright (c) 2003-2006 Ralph Meijer +All of the code in this distribution is Copyright (c) 2003-2006 Ralph Meijer. - Idavoll is made available under the MIT license. The included LICENSE file - describes this in detail. +Idavoll is made available under the MIT license. The included LICENSE file +describes this in detail. Contact ======= diff -r 5191ba7c4df8 -r 6250905b72f6 idavoll/tap.py --- a/idavoll/tap.py Mon Aug 21 16:05:35 2006 +0000 +++ b/idavoll/tap.py Mon Aug 28 12:44:20 2006 +0000 @@ -7,24 +7,24 @@ import idavoll class Options(usage.Options): - optParameters = [ - ('jid', None, 'pubsub'), - ('secret', None, 'secret'), - ('rhost', None, '127.0.0.1'), - ('rport', None, '5347'), - ('backend', None, 'memory'), - ('dbuser', None, ''), - ('dbname', None, 'pubsub'), - ] + optParameters = [ + ('jid', None, 'pubsub'), + ('secret', None, 'secret'), + ('rhost', None, '127.0.0.1'), + ('rport', None, '5347'), + ('backend', None, 'memory'), + ('dbuser', None, ''), + ('dbname', None, 'pubsub'), + ] - optFlags = [ - ('verbose', 'v', 'Show traffic'), - ('hide-nodes', None, 'Hide all nodes for disco') - ] - - def postOptions(self): - if self['backend'] not in ['pgsql', 'memory']: - raise usage.UsageError, "Unknown backend!" + optFlags = [ + ('verbose', 'v', 'Show traffic'), + ('hide-nodes', None, 'Hide all nodes for disco') + ] + + def postOptions(self): + if self['backend'] not in ['pgsql', 'memory']: + raise usage.UsageError, "Unknown backend!" def makeService(config): - return idavoll.makeService(config) + return idavoll.makeService(config) diff -r 5191ba7c4df8 -r 6250905b72f6 idavoll/xmpp_error.py --- a/idavoll/xmpp_error.py Mon Aug 21 16:05:35 2006 +0000 +++ b/idavoll/xmpp_error.py Mon Aug 28 12:44:20 2006 +0000 @@ -4,32 +4,32 @@ NS_XMPP_STANZAS = "urn:ietf:params:xml:ns:xmpp-stanzas" conditions = { - 'bad-request': {'code': '400', 'type': 'modify'}, - 'not-authorized': {'code': '401', 'type': 'cancel'}, - 'item-not-found': {'code': '404', 'type': 'cancel'}, - 'not-acceptable': {'code': '406', 'type': 'modify'}, - 'conflict': {'code': '409', 'type': 'cancel'}, - 'internal-server-error': {'code': '500', 'type': 'wait'}, - 'feature-not-implemented': {'code': '501', 'type': 'cancel'}, - 'service-unavailable': {'code': '503', 'type': 'cancel'}, + 'bad-request': {'code': '400', 'type': 'modify'}, + 'not-authorized': {'code': '401', 'type': 'cancel'}, + 'item-not-found': {'code': '404', 'type': 'cancel'}, + 'not-acceptable': {'code': '406', 'type': 'modify'}, + 'conflict': {'code': '409', 'type': 'cancel'}, + 'internal-server-error': {'code': '500', 'type': 'wait'}, + 'feature-not-implemented': {'code': '501', 'type': 'cancel'}, + 'service-unavailable': {'code': '503', 'type': 'cancel'}, } def error_from_iq(iq, condition, text = '', type = None): - iq.swapAttributeValues("to", "from") - iq["type"] = 'error' - e = iq.addElement("error") + iq.swapAttributeValues("to", "from") + iq["type"] = 'error' + e = iq.addElement("error") - c = e.addElement((NS_XMPP_STANZAS, condition), NS_XMPP_STANZAS) + c = e.addElement((NS_XMPP_STANZAS, condition), NS_XMPP_STANZAS) - if type == None: - type = conditions[condition]['type'] + if type == None: + type = conditions[condition]['type'] - code = conditions[condition]['code'] + code = conditions[condition]['code'] - e["code"] = code - e["type"] = type + e["code"] = code + e["type"] = type - if text: - t = e.addElement((NS_XMPP_STANZAS, "text"), NS_XMPP_STANZAS, text) + if text: + t = e.addElement((NS_XMPP_STANZAS, "text"), NS_XMPP_STANZAS, text) - return iq + return iq