dont use reserved attribute
This commit is contained in:
parent
f512827589
commit
650ff6f3ef
@ -16,14 +16,14 @@ class Rejoin(ModuleBase):
|
||||
def __init__(self, bot, moduleName):
|
||||
ModuleBase.__init__(self, bot, moduleName)
|
||||
try:
|
||||
self.services = self.bot.getmodulesbyservice("services").pop()
|
||||
self._services = self.bot.getmodulesbyservice("services").pop()
|
||||
except KeyError as ke:
|
||||
raise Exception("No services service provider found") from ke
|
||||
|
||||
@hook("KICK")
|
||||
def kicked(self, msg, cmd):
|
||||
channel, who = msg.args
|
||||
if who == self.services.nick():
|
||||
if who == self._services.nick():
|
||||
Thread(target=self.rejoin, args=(self.config.get("delay", 30), channel)).start()
|
||||
|
||||
def rejoin(self, delay, channel):
|
||||
|
@ -32,6 +32,7 @@ def _make_test_tempfiles(length, basedir):
|
||||
return tmpfpath, srchash
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_offerrecv(dccbot, tmpdir):
|
||||
# allocate a temp file
|
||||
flen = 1024 * 51
|
||||
@ -55,6 +56,7 @@ def test_offerrecv(dccbot, tmpdir):
|
||||
assert d.hexdigest() == srchash, "file was mangled in transfer"
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_tooshortfails(dccbot, tmpdir):
|
||||
# allocate a temp file
|
||||
flen = 1024 * 51
|
||||
@ -80,6 +82,7 @@ def test_tooshortfails(dccbot, tmpdir):
|
||||
raise Exception("Did not raise")
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_toolongfails(dccbot, tmpdir):
|
||||
# allocate a temp file
|
||||
flen = 1024 * 51
|
||||
|
Loading…
Reference in New Issue
Block a user