Content-Length: 288914 | pFad | http://github.com/odoo/odoo/pull/193434

65 [IMP] hw_drivers: minor syntax and readability improvements by loouis-t · Pull Request #193434 · odoo/odoo · GitHub
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

[IMP] hw_drivers: minor syntax and readability improvements #193434

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

loouis-t
Copy link
Contributor

@loouis-t loouis-t commented Jan 13, 2025

Description of the issue/feature this PR addresses:

  • Interfaces/Drivers daemon variable was set to True in the run() method of the manager thread (main.py).
    As all Interfaces/Drivers are daemon threads, we directly defined it in the parent Interface/Driver class.
    In addition, Interface start exception handling has been moved to the interface class itself.
  • Some Driver/Interface super calls were still using python2 syntax: super(ClassName, self).
    Those calls were updated to super() following the standard Python3 syntax.

Enterprise PR: https://github.com/odoo/enterprise/pull/77049
Task: 4477917

@loouis-t loouis-t requested a review from a team January 13, 2025 14:36
@robodoo
Copy link
Contributor

robodoo commented Jan 13, 2025

Pull request status dashboard

@loouis-t loouis-t force-pushed the master-hw_drivers-daemonize-inside-class-lotr branch from 22a21e2 to 6102e10 Compare January 13, 2025 14:44
@C3POdoo C3POdoo added the RD research & development, internal work label Jan 13, 2025
@loouis-t loouis-t force-pushed the master-hw_drivers-daemonize-inside-class-lotr branch from 6102e10 to ecfe884 Compare January 13, 2025 15:36
i.start()
except Exception:
_logger.exception("Interface %s could not be started", str(interface))
interface().start()
Copy link
Contributor

Choose a reason for hiding this comment

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

is it not problematic if an interface fail to start (compared to previous code) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is now handled inside the interface itself

Interfaces/Drivers `daemon` variable was set to `True` in the `run()` method of the manager thread
(`main.py`).
As all Interfaces/Drivers are daemon threads, we directly defined it in the parent Interface/Driver class.
In addition, Interface start exception handling has been moved to the interface class itself.
Some Driver/Interface super calls were still using python2 syntax: `super(ClassName, self)`. Those
calls were updated to `super()` following the standard Python3 syntax.

Enterprise PR: [https://github.com/odoo/enterprise/pull/77049](https://github.com/odoo/enterprise/pull/77049)
Task: 4477917
@loouis-t loouis-t force-pushed the master-hw_drivers-daemonize-inside-class-lotr branch from ecfe884 to 204ac43 Compare January 15, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/odoo/odoo/pull/193434

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy