[PR #525] [MERGED] rewrite socket error handling, fixes #522 #533

Closed
opened 2026-02-26 10:32:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nsupdate-info/nsupdate.info/pull/525
Author: @ThomasWaldmann
Created: 4/18/2023
Status: Merged
Merged: 4/18/2023
Merged by: @ThomasWaldmann

Base: masterHead: socket-herror


📝 Commits (1)

📊 Changes

2 files changed (+21 additions, -19 deletions)

View changed files

📝 src/nsupdate/main/dnstools.py (+20 -18)
📝 src/nsupdate/main/views.py (+1 -1)

📄 Description

socket.error is deprecated and is the same as OSError since python 3.3. Of course OSError can mean a lot of stuff, so not sure how that goes...

socket.herror is for gethostbyaddr and has some documented h_error values in netdb.h (but, AFAIK, these symbols are not available via python).

added a handler for h_error 0 (#522), which crashed since a while. removed some unclear error values, let's see what happens.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nsupdate-info/nsupdate.info/pull/525 **Author:** [@ThomasWaldmann](https://github.com/ThomasWaldmann) **Created:** 4/18/2023 **Status:** ✅ Merged **Merged:** 4/18/2023 **Merged by:** [@ThomasWaldmann](https://github.com/ThomasWaldmann) **Base:** `master` ← **Head:** `socket-herror` --- ### 📝 Commits (1) - [`722f76c`](https://github.com/nsupdate-info/nsupdate.info/commit/722f76cb2d36023cda62e67c828117817b839fb5) rewrite socket error handling, fixes #522 ### 📊 Changes **2 files changed** (+21 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `src/nsupdate/main/dnstools.py` (+20 -18) 📝 `src/nsupdate/main/views.py` (+1 -1) </details> ### 📄 Description socket.error is deprecated and is the same as OSError since python 3.3. Of course OSError can mean a lot of stuff, so not sure how that goes... socket.herror is for gethostbyaddr and has some documented h_error values in netdb.h (but, AFAIK, these symbols are not available via python). added a handler for h_error 0 (#522), which crashed since a while. removed some unclear error values, let's see what happens. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 10:32:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#533
No description provided.