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 crash when platform is WLAN Pi Pro #127

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

joshschmelzle
Copy link
Member

@joshschmelzle joshschmelzle commented Oct 17, 2024

Type of change

  • Bug fix (non-breaking change that fixes something)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature changing existing functionality)
  • Code quality improvement (refactor, performance improvements)
  • Documentation update (readme, changelog, man page, etc.)
  • Other (please specify):

Breaking change

Does this Pull Request introduce a breaking change?

No

Proposed change

Please describe the purpose of this change, the problem it solves, and why the change is necessary. Include code snippets or links to related documentation when applicable

This PR fixes the following crash which occurred when running v1.4.5 on the WLAN Pi Pro.

Oct 15 12:10:40 wlanpi-087 fpms[639]: Traceback (most recent call last):
Oct 15 12:10:40 wlanpi-087 fpms[639]:   File "/usr/sbin/fpms", line 5, in <module>
Oct 15 12:10:40 wlanpi-087 fpms[639]:     from fpms.__main__ import main
Oct 15 12:10:40 wlanpi-087 fpms[639]:   File "/opt/wlanpi-fpms/lib/python3.9/site-packages/fpms/__main__.py", line 3, in <module>
Oct 15 12:10:40 wlanpi-087 fpms[639]:     sys.exit(fpms.main())
Oct 15 12:10:40 wlanpi-087 fpms[639]:   File "/opt/wlanpi-fpms/lib/python3.9/site-packages/fpms/fpms.py", line 279, in main
Oct 15 12:10:40 wlanpi-087 fpms[639]:     oled.init()
Oct 15 12:10:40 wlanpi-087 fpms[639]:   File "/opt/wlanpi-fpms/lib/python3.9/site-packages/fpms/modules/wlanpi_oled.py", line 22, in init
Oct 15 12:10:40 wlanpi-087 fpms[639]:     device.init()
Oct 15 12:10:40 wlanpi-087 fpms[639]:   File "/opt/wlanpi-fpms/lib/python3.9/site-packages/fpms/modules/screen/luma.py", line 191, in init
Oct 15 12:10:40 wlanpi-087 fpms[639]:     device.contrast(128)
Oct 15 12:10:40 wlanpi-087 fpms[639]: NameError: name 'device' is not defined

Testing

Please explain how you tested this change manually, and if applicable, what new tests you added.

  • Did you add new automated tests? If yes, explain which edge cases are covered.
  • Does this change affect any existing tests? If so, how did you adjust them?
  • Please provide test run results or screenshots if applicable.

Checklist

  • I have read the contribution guidelines and policies
  • I have targeted this PR against the correct git branch
  • I ran the test suite and verified it succeeded
  • I linked an approved GitHub issue to this PR (next section)
  • I have updated the changelog (if applicable)
  • I have added or updated the documentation (if applicable)

Related Issues/PRs

  • This PR fixes/closes issue #
  • This PR is related to issue #
  • This PR depends on/blocks PR #

@joshschmelzle joshschmelzle self-assigned this Oct 17, 2024
@joshschmelzle joshschmelzle added the bug Something isn't working label Oct 17, 2024
@joshschmelzle joshschmelzle merged commit 7b567e9 into main Oct 17, 2024
3 checks passed
@joshschmelzle joshschmelzle deleted the fix-crash-on-wlanpi-pro branch October 17, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant