Mercurial > libervia-backend
changeset 588:beaf6bec2fcd
Remove every old-style class.
line wrap: on
line diff
--- a/frontends/sortilege_old/boxsizer.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/sortilege_old/boxsizer.py Fri Jan 18 17:55:35 2013 +0100 @@ -23,7 +23,7 @@ from window import Window import os,pdb -class BoxSizer: +class BoxSizer(object): """This class manage the position of the window like boxes."""
--- a/frontends/sortilege_old/window.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/sortilege_old/window.py Fri Jan 18 17:55:35 2013 +0100 @@ -25,7 +25,7 @@ import pdb -class Window(): +class Window(object): def __init__(self, parent, height, width, y, x, border=False, title="", code="utf-8"): self.__border=border self.__title=title
--- a/frontends/src/jp/jp Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/jp/jp Fri Jan 18 17:55:35 2013 +0100 @@ -70,7 +70,7 @@ -class JP(): +class JP(object): def __init__(self): try: self.bridge=DBusBridgeFrontend()
--- a/frontends/src/primitivus/notify.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/primitivus/notify.py Fri Jan 18 17:55:35 2013 +0100 @@ -21,7 +21,7 @@ import dbus -class Notify: +class Notify(object): """Used to send notification and detect if we have focus""" def __init__(self):
--- a/frontends/src/quick_frontend/quick_card_game.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/quick_frontend/quick_card_game.py Fri Jan 18 17:55:35 2013 +0100 @@ -24,7 +24,7 @@ -class QuickCardGame(): +class QuickCardGame(object): def __init__(self, parent, referee, players, player_nick): self._autoplay = None #XXX: use 0 to activate fake play, None else
--- a/frontends/src/quick_frontend/quick_chat.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/quick_frontend/quick_chat.py Fri Jan 18 17:55:35 2013 +0100 @@ -24,7 +24,7 @@ from sat_frontends.quick_frontend.quick_utils import unescapePrivate -class QuickChat(): +class QuickChat(object): def __init__(self, target, host, type='one2one'): self.target = target
--- a/frontends/src/quick_frontend/quick_contact_list.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/quick_frontend/quick_contact_list.py Fri Jan 18 17:55:35 2013 +0100 @@ -22,7 +22,7 @@ from logging import debug -class QuickContactList(): +class QuickContactList(object): """This class manage the visual representation of contacts""" def __init__(self):
--- a/frontends/src/quick_frontend/quick_contact_management.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/quick_frontend/quick_contact_management.py Fri Jan 18 17:55:35 2013 +0100 @@ -24,7 +24,7 @@ import pdb -class QuickContactManagement(): +class QuickContactManagement(object): """This helper class manage the contacts and ease the use of nicknames and shortcuts""" ### FIXME: is SàT a better place for all this stuff ??? ###
--- a/frontends/src/quick_frontend/quick_gateways.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/quick_frontend/quick_gateways.py Fri Jan 18 17:55:35 2013 +0100 @@ -22,7 +22,7 @@ -class QuickGatewaysManager(): +class QuickGatewaysManager(object): def __init__(self, host, gateways, title=_("Gateways manager"), server=None):
--- a/frontends/src/wix/quiz_game.py Fri Jan 18 17:55:34 2013 +0100 +++ b/frontends/src/wix/quiz_game.py Fri Jan 18 17:55:35 2013 +0100 @@ -34,7 +34,7 @@ WIDTH = 800 HEIGHT = 600 -class GraphicElement(): +class GraphicElement(object): """This class is used to represent a card, graphically and logically""" def __init__(self, file, x=0, y=0, zindex=10, transparent=True):
--- a/src/bridge/bridge_constructor/bridge_contructor.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/bridge/bridge_constructor/bridge_contructor.py Fri Jan 18 17:55:35 2013 +0100 @@ -56,7 +56,7 @@ #Used when the signature parsing is going wrong (invalid signature ?) pass -class Constructor: +class Constructor(object): def __init__(self, bridge_template, options): self.bridge_template = bridge_template @@ -561,7 +561,7 @@ class ConstructorError(Exception): pass -class ConstructorFactory: +class ConstructorFactory(object): def create(self, bridge_template, options): if options.protocole=='dbus': return DbusConstructor(bridge_template, options) @@ -572,7 +572,7 @@ raise ConstructorError('Unknown constructor type') -class BridgeConstructor: +class BridgeConstructor(object): def __init__(self): self.options = None
--- a/src/memory/memory.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/memory/memory.py Fri Jan 18 17:55:35 2013 +0100 @@ -37,7 +37,7 @@ SAVEFILE_DATABASE="/sat.db" -class Params(): +class Params(object): """This class manage parameters with xml""" ### TODO: add desciption in params @@ -528,7 +528,7 @@ self.host.bridge.paramUpdate(name, value, category, profile) self.storage.setIndParam(category, name, value, profile) -class Memory: +class Memory(object): """This class manage all persistent informations""" def __init__(self, host):
--- a/src/memory/persistent.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/memory/persistent.py Fri Jan 18 17:55:35 2013 +0100 @@ -24,7 +24,7 @@ class MemoryNotInitializedError(Exception): pass -class PersistentDict: +class PersistentDict(object): """A dictionary which save persistently each value assigned /!\ be careful, each assignment means a database write /!\ Memory must be initialised before loading/setting value with instances of this class"""
--- a/src/memory/sqlite.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/memory/sqlite.py Fri Jan 18 17:55:35 2013 +0100 @@ -27,7 +27,7 @@ import time import cPickle as pickle -class SqliteStorage(): +class SqliteStorage(object): """This class manage storage with Sqlite database"""
--- a/src/plugins/deprecated_misc_cs.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/deprecated_misc_cs.py Fri Jan 18 17:55:35 2013 +0100 @@ -54,7 +54,7 @@ AGENT = 'Salut à Toi XMPP/CS Plugin' -class CS_Plugin(): +class CS_Plugin(object): params = """ <params>
--- a/src/plugins/plugin_exp_parrot.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_exp_parrot.py Fri Jan 18 17:55:35 2013 +0100 @@ -37,7 +37,7 @@ "description": _("""Implementation of parrot mode (repeat messages between 2 entities)""") } -class Exp_Parrot(): +class Exp_Parrot(object): """Parrot mode plugin: repeat messages from one entity or MUC room to another one""" #XXX: This plugin can be potentially dangerous if we don't trust entities linked # this is specially true if we have other triggers.
--- a/src/plugins/plugin_exp_pipe.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_exp_pipe.py Fri Jan 18 17:55:35 2013 +0100 @@ -44,7 +44,7 @@ "description": _("""Implementation of SI Pipe Transfer""") } -class Exp_Pipe(): +class Exp_Pipe(object): """This is a modified version of XEP-0096 to work with named pipes instead of files""" def __init__(self, host):
--- a/src/plugins/plugin_misc_account.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_account.py Fri Jan 18 17:55:35 2013 +0100 @@ -78,7 +78,7 @@ self.deferred.errback("INTERNAL") -class MiscAccount(): +class MiscAccount(object): """Account plugin: create a SàT + Prosody account, used by Libervia""" #XXX: This plugin is a Q&D one used for the demo. Something more generic (and not # only focused on Prosody) is planed
--- a/src/plugins/plugin_misc_groupblog.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_groupblog.py Fri Jan 18 17:55:35 2013 +0100 @@ -73,7 +73,7 @@ class UnknownType(Exception): pass -class GroupBlog(): +class GroupBlog(object): """This class use a SàT PubSub Service to manage access on microblog""" def __init__(self, host):
--- a/src/plugins/plugin_misc_imap.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_imap.py Fri Jan 18 17:55:35 2013 +0100 @@ -49,7 +49,7 @@ "description": _("""Create an Imap server that you can use to read your "normal" type messages""") } -class IMAP_server(): +class IMAP_server(object): #TODO: connect profile on mailbox request, once password is accepted params = """ @@ -75,7 +75,7 @@ self.server_factory = ImapServerFactory(self.host) reactor.listenTCP(port, self.server_factory) -class Message(): +class Message(object): implements(imap4.IMessage) def __init__(self, uid, flags, mess_fp): @@ -151,7 +151,7 @@ return TypeError -class SatMailbox: +class SatMailbox(object): implements(imap4.IMailbox) def __init__(self,host,name,profile): @@ -389,7 +389,7 @@ return SatMailbox(self.host,name,self.profile) -class ImapRealm: +class ImapRealm(object): implements(portal.IRealm) def __init__(self,host): @@ -402,7 +402,7 @@ raise NotImplementedError return imap4.IAccount, ImapSatAccount(self.host,profile), lambda:None -class SatProfileCredentialChecker: +class SatProfileCredentialChecker(object): """ This credential checker check against SàT's profile and associated jabber's password Check if the profile exists, and if the password is OK
--- a/src/plugins/plugin_misc_maildir.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_maildir.py Fri Jan 18 17:55:35 2013 +0100 @@ -56,7 +56,7 @@ class MaildirError(Exception): pass -class MaildirBox(): +class MaildirBox(object): def __init__(self, host): info(_("Plugin Maildir initialization")) @@ -306,7 +306,7 @@ pass -class MailboxUser: +class MailboxUser(object): """This class is used to access a mailbox""" def xmppMessage2mail(self, message):
--- a/src/plugins/plugin_misc_quiz.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_quiz.py Fri Jan 18 17:55:35 2013 +0100 @@ -57,7 +57,7 @@ } -class Quiz(): +class Quiz(object): def __init__(self, host): info(_("Plugin Quiz initialization"))
--- a/src/plugins/plugin_misc_radiocol.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_radiocol.py Fri Jan 18 17:55:35 2013 +0100 @@ -56,7 +56,7 @@ QUEUE_LIMIT = 2 -class Radiocol(): +class Radiocol(object): def __init__(self, host): info(_("Radio collective initialization"))
--- a/src/plugins/plugin_misc_smtp.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_smtp.py Fri Jan 18 17:55:35 2013 +0100 @@ -49,7 +49,7 @@ "description": _("""Create a SMTP server that you can use to send your "normal" type messages""") } -class SMTP_server(): +class SMTP_server(object): params = """ <params> @@ -74,7 +74,7 @@ self.server_factory = SmtpServerFactory(self.host) reactor.listenTCP(port, self.server_factory) -class SatSmtpMessage: +class SatSmtpMessage(object): implements(smtp.IMessage) def __init__(self, host, profile): @@ -103,7 +103,7 @@ """handle message truncated""" raise smtp.SMTPError -class SatSmtpDelivery: +class SatSmtpDelivery(object): implements(smtp.IMessageDelivery) def __init__(self, host, profile): @@ -144,7 +144,7 @@ """ return origin -class SmtpRealm: +class SmtpRealm(object): implements(portal.IRealm) def __init__(self,host): @@ -157,7 +157,7 @@ raise NotImplementedError return smtp.IMessageDelivery, SatSmtpDelivery(self.host,profile), lambda:None -class SatProfileCredentialChecker: +class SatProfileCredentialChecker(object): """ This credential checker check against SàT's profile and associated jabber's password Check if the profile exists, and if the password is OK
--- a/src/plugins/plugin_misc_tarot.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_tarot.py Fri Jan 18 17:55:35 2013 +0100 @@ -54,7 +54,7 @@ } -class Tarot(): +class Tarot(object): def __init__(self, host): info(_("Plugin Tarot initialization"))
--- a/src/plugins/plugin_misc_text_commands.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_text_commands.py Fri Jan 18 17:55:35 2013 +0100 @@ -33,7 +33,7 @@ "description": _("""IRC like text commands""") } -class TextCommands(): +class TextCommands(object): #FIXME: doc strings for commands have to be translatable # plugins need a dynamic translation system (translation # should be downloadable independently)
--- a/src/plugins/plugin_misc_xmllog.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_misc_xmllog.py Fri Jan 18 17:55:35 2013 +0100 @@ -52,7 +52,7 @@ return XmlStream.dataReceived(self, data) -class XmlLog(): +class XmlLog(object): params = """ <params>
--- a/src/plugins/plugin_xep_0020.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0020.py Fri Jan 18 17:55:35 2013 +0100 @@ -44,7 +44,7 @@ "description": _("""Implementation of Feature Negotiation""") } -class XEP_0020(): +class XEP_0020(object): def __init__(self, host): info(_("Plugin XEP_0020 initialization"))
--- a/src/plugins/plugin_xep_0045.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0045.py Fri Jan 18 17:55:35 2013 +0100 @@ -49,7 +49,7 @@ class UnknownRoom(Exception): pass -class XEP_0045(): +class XEP_0045(object): def __init__(self, host): info(_("Plugin XEP_0045 initialization"))
--- a/src/plugins/plugin_xep_0047.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0047.py Fri Jan 18 17:55:35 2013 +0100 @@ -57,7 +57,7 @@ "description": _("""Implementation of In-Band Bytestreams""") } -class XEP_0047(): +class XEP_0047(object): NAMESPACE = NS_IBB def __init__(self, host):
--- a/src/plugins/plugin_xep_0054.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0054.py Fri Jan 18 17:55:35 2013 +0100 @@ -64,7 +64,7 @@ "description": _("""Implementation of vcard-temp""") } -class XEP_0054(): +class XEP_0054(object): #TODO: - check that nickname is ok # - refactor the code/better use of Wokkel # - get missing values
--- a/src/plugins/plugin_xep_0060.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0060.py Fri Jan 18 17:55:35 2013 +0100 @@ -40,7 +40,7 @@ "description": _("""Implementation of PubSub Protocol""") } -class XEP_0060(): +class XEP_0060(object): def __init__(self, host): info(_("PubSub plugin initialization"))
--- a/src/plugins/plugin_xep_0065.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0065.py Fri Jan 18 17:55:35 2013 +0100 @@ -439,7 +439,7 @@ self.finishedCb(self.sid, reason.type == jab_error.ConnectionDone, self.profile) #TODO: really check if the state is actually successful -class XEP_0065(): +class XEP_0065(object): NAMESPACE = NS_BS
--- a/src/plugins/plugin_xep_0077.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0077.py Fri Jan 18 17:55:35 2013 +0100 @@ -38,7 +38,7 @@ "description": _("""Implementation of in-band registration""") } -class XEP_0077(): +class XEP_0077(object): def __init__(self, host): info(_("Plugin XEP_0077 initialization"))
--- a/src/plugins/plugin_xep_0095.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0095.py Fri Jan 18 17:55:35 2013 +0100 @@ -52,7 +52,7 @@ "description": _("""Implementation of Stream Initiation""") } -class XEP_0095(): +class XEP_0095(object): def __init__(self, host): info(_("Plugin XEP_0095 initialization"))
--- a/src/plugins/plugin_xep_0096.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0096.py Fri Jan 18 17:55:35 2013 +0100 @@ -45,7 +45,7 @@ "description": _("""Implementation of SI File Transfer""") } -class XEP_0096(): +class XEP_0096(object): def __init__(self, host): info(_("Plugin XEP_0096 initialization"))
--- a/src/plugins/plugin_xep_0100.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0100.py Fri Jan 18 17:55:35 2013 +0100 @@ -34,7 +34,7 @@ "description": _("""Implementation of Gateways protocol""") } -class XEP_0100(): +class XEP_0100(object): def __init__(self, host): info(_("Gateways plugin initialization"))
--- a/src/plugins/plugin_xep_0115.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0115.py Fri Jan 18 17:55:35 2013 +0100 @@ -73,7 +73,7 @@ return "%s/%s/%s/%s" % (self.category, self.idType, self.lang, self.name) -class XEP_0115(): +class XEP_0115(object): cap_hash = None #capabilities hash is class variable as it is common to all profiles #TODO: this code is really dirty, need to clean it and try to move it to Wokkel
--- a/src/plugins/plugin_xep_0163.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0163.py Fri Jan 18 17:55:35 2013 +0100 @@ -42,7 +42,7 @@ "description": _("""Implementation of Personal Eventing Protocol""") } -class XEP_0163(): +class XEP_0163(object): def __init__(self, host): info(_("PEP plugin initialization"))
--- a/src/plugins/plugin_xep_0249.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0249.py Fri Jan 18 17:55:35 2013 +0100 @@ -49,7 +49,7 @@ "description": _("""Implementation of Direct MUC Invitations""") } -class XEP_0249(): +class XEP_0249(object): def __init__(self, host): info(_("Plugin XEP_0249 initialization"))
--- a/src/plugins/plugin_xep_0277.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/plugins/plugin_xep_0277.py Fri Jan 18 17:55:35 2013 +0100 @@ -53,7 +53,7 @@ class NodeAccessChangeException(Exception): pass -class XEP_0277(): +class XEP_0277(object): def __init__(self, host): info(_("Microblogging plugin initialization"))
--- a/src/tools/games.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/tools/games.py Fri Jan 18 17:55:35 2013 +0100 @@ -27,7 +27,7 @@ suits_order = ['pique', 'coeur', 'trefle', 'carreau', 'atout'] #I have switched the usual order 'trefle' and 'carreau' because card are more easy to see if suit colour change (black, red, black, red) values_order = map(str,range(1,11))+["valet","cavalier","dame","roi"] -class TarotCard(): +class TarotCard(object): """This class is used to represent a car logically""" #TODO: move this in a library in tools, and share this with frontends (e.g. card_game in wix use the same class)
--- a/src/tools/misc.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/tools/misc.py Fri Jan 18 17:55:35 2013 +0100 @@ -31,7 +31,7 @@ followind triggers list """ pass -class TriggerManager: +class TriggerManager(object): """This class manage triggers: code which interact to change de behaviour of SàT""" def __init__(self):
--- a/src/tools/xml_tools.py Fri Jan 18 17:55:34 2013 +0100 +++ b/src/tools/xml_tools.py Fri Jan 18 17:55:35 2013 +0100 @@ -107,7 +107,7 @@ -class XMLUI: +class XMLUI(object): """This class is used to create a user interface (form/window/parameters/etc) using SàT XML""" def __init__(self, panel_type, layout="vertical", title=None):