Skip to content

remote_registration.py: Fix TypeError when logging a failed cert request - #262

Open
Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-cert-request-log-format
Open

Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-cert-request-log-format

Conversation

@Amadeus-22

Copy link
Copy Markdown

In Request.request() the socket.error handler formats its message with two placeholders and three arguments:

logging.critical("Something wrong with cert request (%s:%s): " % (remote_ip, self.port, e))

so instead of logging the socket error it raises TypeError: not all arguments converted during string formatting. This is reached during registration with a v1 peer when the UDP request fails with anything other than a timeout (for example, network unreachable).

Added the missing %s.

Note: #245 removes the v1 registration code, including this line. If that is going in, feel free to close this one.

🤖 Generated with Claude Code

The format string had two placeholders for three arguments, so the
socket.error handler raised TypeError instead of logging the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant