Skip to content

One more case for _buffer_split0 #56

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 1 commit into from
Dec 18, 2020

Conversation

askpatrickw
Copy link
Contributor

There was a second case where a bytearray was being split. We need to use @jepler's fix there as well.

Without this fix, when you would reuse your requests object you'd get an error.

response = requests.get("https://io.adafruit.com/api/v2/time/seconds")

response = requests.get("https://io.adafruit.com/api/v2/time/seconds")
_last_response: <Response object at 3f7b3b20>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lib/adafruit_requests.py", line 613, in get
  File "/lib/adafruit_requests.py", line 569, in request
  File "/lib/adafruit_requests.py", line 277, in close
AttributeError: 'bytearray' object has no attribute 'split'

Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Thank you!

@jepler jepler merged commit c070f6e into adafruit:master Dec 18, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 22, 2020
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