Skip to content

Check errno values in exceptions against errno.<constant>#71

Merged
FoamyGuy merged 1 commit intoadafruit:mainfrom
JonNelson:fix-None-and-int-comparison
Mar 19, 2026
Merged

Check errno values in exceptions against errno.<constant>#71
FoamyGuy merged 1 commit intoadafruit:mainfrom
JonNelson:fix-None-and-int-comparison

Conversation

@JonNelson
Copy link
Copy Markdown
Contributor

Don't hard-code errno values, instead refer to the symbols in the errno module. Also, prefer to use the .errno exception instance data member instead of .args[0]; the former is more idiomatic.

Don't hard-code errno values, instead refer to the symbols in the errno
module. Also, prefer to use the `.errno` exception instance data member
instead of `.args[0]`; the former is more idiomatic.
Copy link
Copy Markdown
Contributor

@FoamyGuy FoamyGuy 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!

This looks good to me. I confirmed e.errno and the errno module comparison work in REPL.

@FoamyGuy FoamyGuy merged commit c907b8e into adafruit:main Mar 19, 2026
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 19, 2026
Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx to 2.6.0 from 2.5.19:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP230xx#62 from jimmydoh/patch-mcp23008-interrupts

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS3430 to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCS3430#1 from adafruit/split_interrupt_examples

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 7.4.3 from 7.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#185 from pinkavaj/pi-optimize-listen

Updating https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect to 1.3.0 from 1.2.19:
  > Merge pull request adafruit/Adafruit_CircuitPython_BluefruitConnect#41 from FoamyGuy/image_receiver

Updating https://github.com/adafruit/Adafruit_CircuitPython_Debug_I2C to 1.2.24 from 1.2.22:
  > Merge pull request adafruit/Adafruit_CircuitPython_Debug_I2C#18 from FoamyGuy/fix_out_end_default_val
  > Merge pull request adafruit/Adafruit_CircuitPython_Debug_I2C#17 from FoamyGuy/core_bus_device_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_AnalogClock to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_AnalogClock#3 from FoamyGuy/seconds_hand_examples

Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 5.6.2 from 5.6.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Logging#71 from JonNelson/fix-None-and-int-comparison

Updating https://github.com/adafruit/Adafruit_CircuitPython_Qualia to 2.2.2 from 2.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Qualia#17 from makermelissa/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Mouse to 1.6.2 from 1.6.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_USB_Host_Mouse#16 from relic-se/scale-arg
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