-
Notifications
You must be signed in to change notification settings - Fork 39
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
Geolocation Logging #198
Geolocation Logging #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed.
modules/geolocation/geolocation.py
Outdated
# All exceptions must be caught and logged as early as possible | ||
# pylint: disable-next=bare-except | ||
except: | ||
# TODO: Logging | ||
# pylint: disable-next=catching-non-exception | ||
except cv2.error as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this specific exception being caught instead of using the broader catch, especially since the code is identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because of this comment. I thought this was needed because cv2.error
was separate from the Exception
class but it turns out cv2.error
inherits from the Exception
class so I removed it. Thanks for catching this.
class error(Exception):
code: int
err: str
file: str
func: str
line: int
msg: str
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth separating them out unless there is a specific use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, thanks!
Add Logging to Geolocation
Key Changes
DetectionInWorld
Testing
test_geolocation_worker
integration test works and confirm logs are logged as expectedOutput from log file