Skip to content

Conversation

@slammingprogramming
Copy link
Contributor

Fixes #1088 by sanitizing the inputs to mac, vendor, and name before running .upper/.lower to ensure they are type STR to avoid AttributeError

Closes #1088

Fixes netalertx#1088 by sanitizing the inputs to mac, vendor, and name before running .upper/.lower to ensure they are type STR to avoid AttributeError
@jokob-sk
Copy link
Collaborator

Cheers @slammingprogramming 🙏🙂

@jokob-sk jokob-sk merged commit cc51391 into netalertx:main Jun 25, 2025
3 checks passed
@slammingprogramming slammingprogramming deleted the fix-numeric-hostnames branch June 25, 2025 10:34
@jokob-sk
Copy link
Collaborator

Hey @slammingprogramming 👋 do you think your changes to device_handling.py can be merged to main? Thinking of pushing out a release this week before I start working on #724

@slammingprogramming
Copy link
Contributor Author

@jokob-sk the ones i have submitted should be fine, that other original one we reverted I don't recommend, only because I haven't confirmed all changes are stable. this one is stable, though. simple fix for the string sanitization is all. it's been working reliably for me with this fix injected into my docker of netalertx (the stable release docker)

i have not yet tested it working under all changes in the netalertx-dev docker, so I'd recommend we make sure it works with all changes made there. But it's probably fine.

@jokob-sk
Copy link
Collaborator

Thanks! Feel free to open a new PR once you are happy and I have a look 🙂

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.

Crash on Device Hostname That Is All Numbers (int type) - AttributeError on .lower()

2 participants