Class attributes instead of instance attributes.

This commit is contained in:
Valentin Lorentz 2015-12-20 04:41:02 +01:00
parent 3a51916f34
commit 62d176209c
2 changed files with 6 additions and 3 deletions

View File

@ -17,14 +17,15 @@ supybot.networks.testnet.sasl.mechanisms: {mechanisms}
""" """
class LimnoriaController(BaseClientController, DirectoryBasedController): class LimnoriaController(BaseClientController, DirectoryBasedController):
supported_sasl_mechanisms = {
'PLAIN', 'ECDSA-NIST256P-CHALLENGE', 'EXTERNAL',
}
def create_config(self): def create_config(self):
super().create_config() super().create_config()
with self.open_file('bot.conf'): with self.open_file('bot.conf'):
pass pass
with self.open_file('conf/users.conf'): with self.open_file('conf/users.conf'):
pass pass
self.supported_sasl_mechanisms = [
'PLAIN', 'ECDSA-NIST256P-CHALLENGE', 'EXTERNAL']
def run(self, hostname, port, auth): def run(self, hostname, port, auth):
# Runs a client with the config given as arguments # Runs a client with the config given as arguments

View File

@ -18,11 +18,13 @@ auth_password = {password}
""" """
class SopelController(BaseClientController): class SopelController(BaseClientController):
supported_sasl_mechanisms = [
'PLAIN',
]
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.filename = next(tempfile._get_candidate_names()) + '.cfg' self.filename = next(tempfile._get_candidate_names()) + '.cfg'
self.proc = None self.proc = None
self.supported_sasl_mechanisms = ['PLAIN']
def kill(self): def kill(self):
if self.proc: if self.proc:
self.proc.kill() self.proc.kill()