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

Fix tests parameters & MAIL_DEBUG as integer #877

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

nledez
Copy link
Contributor

@nledez nledez commented Oct 18, 2024

Problem
Flask-mail want a integer for MAIL_DEBUG parameter.

err: Traceback (most recent call last):
err:   File "/opt/zou/zouenv/bin/zou", line 5, in <module>
err:     from zou.cli import cli
err:   File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/cli.py", line 11, in <module>
err:     from zou.app.utils import dbhelpers, auth, commands
err:   File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/__init__.py", line 26, in <module>
err:     from zou.app import config, swagger
err:   File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/config.py", line 84, in <module>
err:     MAIL_DEBUG = envtobool("MAIL_DEBUG", 0)
err:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
err:   File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/utils/env.py", line 11, in envtobool
err:     return strtobool(os.getenv(key, default))
err:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
err:   File "/opt/zou/zouenv/lib/python3.12/site-packages/zou/app/utils/string.py", line 9, in strtobool
err:     elif val.lower() in ("y", "yes", "t", "true", "on", "1"):
err:          ^^^^^^^^^
err: AttributeError: 'int' object has no attribute 'lower'
[202](https://github.com/cgwire/zou/actions/runs/11405086536/job/31735727254#step:3:203)4/10/18 13:56:40 Process exited with status 1

Solution
Correction of the conversion of the bool parameter to int.
The test parameters have also been modified to have the same behaviour as before.

@frankrousseau frankrousseau merged commit 3abf63d into cgwire:master Oct 18, 2024
7 checks passed
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