about summary refs log tree commit diff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-11-01 02:47:03 +0300
committerNakidai <nakidai@disroot.org>2024-11-01 02:47:03 +0300
commit5a0faa2bccf9cdec1bb57f0c11f632679538ebc3 (patch)
tree18a082e6e41ae6031ad8299676f8f55859f9f0b5 /pyproject.toml
parent815382fe0c48a2fc2af1c256b3e52a9f3433e20a (diff)
downloadpetthecord-5a0faa2bccf9cdec1bb57f0c11f632679538ebc3.tar.gz
petthecord-5a0faa2bccf9cdec1bb57f0c11f632679538ebc3.zip
Suppress error on remove
When I was checking logs I've found that when ptc tries to update cache
because of new avatar the function raises an error about some
non-existent file:

    Traceback (most recent call last):
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
        resp = await request_handler(request)
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/aiohttp/web_app.py", line 537, in _handle
        resp = await handler(request)
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/server.py", line 35, in petpet
        return Response(body=await self._petter.petpet(uid), content_type="image/gif")
      File "/var/lib/ptc/venv/lib/python3.10/site-packages/petthecord/cache.py", line 74, in petpet
        remove(path)
    FileNotFoundError: [Errno 2] No such file or directory: '/var/cache/petthecord/...gif'

Well, I think that it's OK to just suppress the error because GC still
will remove all unneeded files.
Diffstat (limited to 'pyproject.toml')
0 files changed, 0 insertions, 0 deletions