Skip to content

housekep.py gather possible TypeError when used outside tox #597

Description

@loqs

Steps to reproduce:

$ git clone https://github.com/aio-libs/aiosmtpd
$ cd aiosmtpd/
$ mkdir -p prof
$ touch prof/empty.prof
$ python housekeep.py gather
▞▞▞ Python interpreter details:
    3.13.7 (main, Aug 15 2025, 12:34:02) [GCC 15.2.1 20250813]
    /var/cache/github/aio-libs/aiosmtpd/venv/bin/python
>>> housekeep.py gather
Traceback (most recent call last):
  File "/var/cache/github/aio-libs/aiosmtpd/housekeep.py", line 274, in <module>
    dispatcher()
    ~~~~~~~~~~^^
  File "/var/cache/github/aio-libs/aiosmtpd/housekeep.py", line 178, in dispatch_gather
    move_prof()
    ~~~~~~~~~^^
  File "/var/cache/github/aio-libs/aiosmtpd/housekeep.py", line 115, in move_prof
    targpath = profpath / TOX_ENV_NAME
               ~~~~~~~~~^~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'NoneType'

Versions:
Python 3.13.7
aiosmtpd dc78ef6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions