Remove every old-style class.
This commit is contained in:
parent
27b3592e16
commit
88074cd284
34 changed files with 56 additions and 56 deletions
|
|
@ -56,7 +56,7 @@ class ParseError(Exception):
|
|||
#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 DbusXmlConstructor(Constructor):
|
|||
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 @@ class ConstructorFactory:
|
|||
|
||||
raise ConstructorError('Unknown constructor type')
|
||||
|
||||
class BridgeConstructor:
|
||||
class BridgeConstructor(object):
|
||||
def __init__(self):
|
||||
self.options = None
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ SAVEFILE_PARAM_XML="/param" #xml parameters template
|
|||
SAVEFILE_DATABASE="/sat.db"
|
||||
|
||||
|
||||
class Params():
|
||||
class Params(object):
|
||||
"""This class manage parameters with xml"""
|
||||
### TODO: add desciption in params
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ class Params():
|
|||
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):
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ from logging import debug, info, warning, error
|
|||
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"""
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import os.path
|
|||
import time
|
||||
import cPickle as pickle
|
||||
|
||||
class SqliteStorage():
|
||||
class SqliteStorage(object):
|
||||
"""This class manage storage with Sqlite database"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ PLUGIN_INFO = {
|
|||
|
||||
AGENT = 'Salut à Toi XMPP/CS Plugin'
|
||||
|
||||
class CS_Plugin():
|
||||
class CS_Plugin(object):
|
||||
|
||||
params = """
|
||||
<params>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ PLUGIN_INFO = {
|
|||
"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.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PLUGIN_INFO = {
|
|||
"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):
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class ProsodyRegisterProtocol(protocol.ProcessProtocol):
|
|||
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
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class BadAccessListError(Exception):
|
|||
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):
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ PLUGIN_INFO = {
|
|||
"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 @@ class IMAP_server():
|
|||
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 @@ class Message():
|
|||
return TypeError
|
||||
|
||||
|
||||
class SatMailbox:
|
||||
class SatMailbox(object):
|
||||
implements(imap4.IMailbox)
|
||||
|
||||
def __init__(self,host,name,profile):
|
||||
|
|
@ -389,7 +389,7 @@ class ImapSatAccount(imap4.MemoryAccount):
|
|||
return SatMailbox(self.host,name,self.profile)
|
||||
|
||||
|
||||
class ImapRealm:
|
||||
class ImapRealm(object):
|
||||
implements(portal.IRealm)
|
||||
|
||||
def __init__(self,host):
|
||||
|
|
@ -402,7 +402,7 @@ class ImapRealm:
|
|||
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
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ MAILDIR_PATH = "Maildir"
|
|||
class MaildirError(Exception):
|
||||
pass
|
||||
|
||||
class MaildirBox():
|
||||
class MaildirBox(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Plugin Maildir initialization"))
|
||||
|
|
@ -306,7 +306,7 @@ class MaildirBox():
|
|||
pass
|
||||
|
||||
|
||||
class MailboxUser:
|
||||
class MailboxUser(object):
|
||||
"""This class is used to access a mailbox"""
|
||||
|
||||
def xmppMessage2mail(self, message):
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ PLUGIN_INFO = {
|
|||
}
|
||||
|
||||
|
||||
class Quiz():
|
||||
class Quiz(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Plugin Quiz initialization"))
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ PLUGIN_INFO = {
|
|||
QUEUE_LIMIT = 2
|
||||
|
||||
|
||||
class Radiocol():
|
||||
class Radiocol(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Radio collective initialization"))
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ PLUGIN_INFO = {
|
|||
"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 @@ class SMTP_server():
|
|||
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 @@ class SatSmtpMessage:
|
|||
"""handle message truncated"""
|
||||
raise smtp.SMTPError
|
||||
|
||||
class SatSmtpDelivery:
|
||||
class SatSmtpDelivery(object):
|
||||
implements(smtp.IMessageDelivery)
|
||||
|
||||
def __init__(self, host, profile):
|
||||
|
|
@ -144,7 +144,7 @@ class SatSmtpDelivery:
|
|||
"""
|
||||
return origin
|
||||
|
||||
class SmtpRealm:
|
||||
class SmtpRealm(object):
|
||||
implements(portal.IRealm)
|
||||
|
||||
def __init__(self,host):
|
||||
|
|
@ -157,7 +157,7 @@ class SmtpRealm:
|
|||
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
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ PLUGIN_INFO = {
|
|||
}
|
||||
|
||||
|
||||
class Tarot():
|
||||
class Tarot(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Plugin Tarot initialization"))
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ PLUGIN_INFO = {
|
|||
"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)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class LoggingXmlStream(XmlStream):
|
|||
return XmlStream.dataReceived(self, data)
|
||||
|
||||
|
||||
class XmlLog():
|
||||
class XmlLog(object):
|
||||
|
||||
params = """
|
||||
<params>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PLUGIN_INFO = {
|
|||
"description": _("""Implementation of Feature Negotiation""")
|
||||
}
|
||||
|
||||
class XEP_0020():
|
||||
class XEP_0020(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Plugin XEP_0020 initialization"))
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ PLUGIN_INFO = {
|
|||
class UnknownRoom(Exception):
|
||||
pass
|
||||
|
||||
class XEP_0045():
|
||||
class XEP_0045(object):
|
||||
|
||||
def __init__(self, host):
|
||||
info(_("Plugin XEP_0045 initialization"))
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ PLUGIN_INFO = {
|
|||
"description": _("""Implementation of In-Band Bytestreams""")
|
||||
}
|
||||
|
||||
class XEP_0047():
|
||||
class XEP_0047(object):
|
||||
NAMESPACE = NS_IBB
|
||||
|
||||
def __init__(self, host):
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue