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 loglevel type error when starting bashlib worker #1121

Merged
merged 5 commits into from
Oct 19, 2023
Merged

Conversation

joschrew
Copy link
Contributor

The log-level is provided as an Integer but a String, 'DEBUG' for example, is needed.

Copy link
Member

@kba kba left a comment

Choose a reason for hiding this comment

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

I would fix the problem at the source of the call in ocrd_network/ocrd_network/process_helpers.py

- return_code = run_cli(                   
-     executable=executable,
-     # [...]
-     log_level=logging.DEBUG              
- )
+ return_code = run_cli(                   
+     executable=executable,
+     # [...]
+     log_level='DEBUG'
+ )                                        

@joschrew
Copy link
Contributor Author

I have already fixed that (just now) with accepting both str and int (e.g. loglevel.DEBUG). Test should pass now

ocrd/ocrd/processor/helpers.py Outdated Show resolved Hide resolved
ocrd/ocrd/processor/helpers.py Outdated Show resolved Hide resolved
joschrew and others added 2 commits October 19, 2023 13:03
@kba kba merged commit 421b06a into master Oct 19, 2023
2 checks passed
@kba kba deleted the fix-bashlib-log branch October 19, 2023 12:15
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