Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dont require secrets if no network #70

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

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

FoamyGuy
Copy link
Contributor

This change goes along with: adafruit/Adafruit_CircuitPython_ESP32S2TFT#6
which allows the user to specify with keyword argument that they don't intend to use the network when they initialize the helper class.

The changes here are checking self.network for None and raising exceptions any time the user is attempting to use network related features when they previously specified that they weren't going to use the network and thus self.network got set to None.

@FoamyGuy
Copy link
Contributor Author

I tested these changes successfully under the following scenarios:

Feather S2 TFT - use_network=False and don't call any functions that are network related features -> prints the warning message but does allow the code to complete

Feather S2 TFT use_network=False and user code does try to use a network related feature -> raises RuntimeError indicating that network must not be None in order to use that feature.

PyPortal Titano - ISS tracking project with normal network configuration -> No change in behavior, works the same as current version of PortalBase.

@FoamyGuy FoamyGuy requested a review from makermelissa April 18, 2022 22:10
Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Didn't test, but looks good otherwise.

@FoamyGuy FoamyGuy merged commit bcfaae8 into adafruit:main Apr 25, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 26, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_SD to 3.3.9 from 3.3.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_SD#48 from tekktrik/doc/add-typing
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
  > Update Black to latest.

Updating https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay to 1.4.0 from 1.2.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_SharpMemoryDisplay#21 from tekktrik/dev/switch-bus-device
  > Merge pull request adafruit/Adafruit_CircuitPython_SharpMemoryDisplay#19 from ilikecake/image-function-numpy
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
  > Update Black to latest.
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_PortalBase to 1.13.0 from 1.12.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#70 from FoamyGuy/dont_require_secrets_if_no_network
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
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