Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatmaild metrics: fix counting logic #521

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

feld
Copy link
Collaborator

@feld feld commented Mar 14, 2025

Ensure the candidates for possible accounts are directories with a "cur" subdir to ensure it is a real maildir

@hpk42
Copy link
Contributor

hpk42 commented Mar 16, 2025

you also need to change the tests (see isolated chatmaild tests CI)

@@ -11,6 +11,8 @@ def main(vmail_dir=None):
ci_accounts = 0

for path in Path(vmail_dir).iterdir():
if not path.is_dir() or not (path / "cur").is_dir():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's sufficient to directly test the target dir i think

Suggested change
if not path.is_dir() or not (path / "cur").is_dir():
if not (path / "cur").is_dir():

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants