about summary refs log tree commit diff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-10-29 23:40:19 +0300
committerNakidai <nakidai@disroot.org>2024-10-29 23:40:19 +0300
commit55ef8e5f692a1f7188263e861bc21cda2e8631e1 (patch)
treec7504693eabcc5cda03573f15312f8a597e49608 /pyproject.toml
parentdadf4304f5a796db79f62ebecf08397436b7058f (diff)
downloadpetthecord-55ef8e5f692a1f7188263e861bc21cda2e8631e1.tar.gz
petthecord-55ef8e5f692a1f7188263e861bc21cda2e8631e1.zip
Possibly fix bug in GC
When I was checking log of this bot I've noticed that thing in gc loop

    Traceback (most recent call last):
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/discord/client.py", line 449, in _run_event
        await coro(*args, **kwargs)
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/runner.py", line 57, in on_ready
        await petter.gc_loop()
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/cache.py", line 107, in gc_loop
        del self._cache[filename.split('_')[0]]
    KeyError: '...'

I don't really want to know why this error has occured, but IMO it's
something related to broken index.json. So to fix the bug I just wrapped
deleting action to try-except block which will ignore the KeyError
exception. TBH looks like a kludge, but as I said I don't want to get
into it :>
Diffstat (limited to 'pyproject.toml')
0 files changed, 0 insertions, 0 deletions