Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/socket.py
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
  • Loading branch information
akulakov and ambv authored Aug 26, 2021
commit a17e0761db6aa033b5f406fc304ee7371a418bc8
6 changes: 3 additions & 3 deletions Lib/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ def getfqdn(name=''):
An empty argument is interpreted as meaning the local host.

First the hostname returned by gethostbyaddr() is checked, then
possibly existing aliases. If that logic fails and `name` is empty or is
'0.0.0.0', hostname from gethostname() is returned. Otherwise, `name` is
returned unchanged.
possibly existing aliases. In case no FQDN is available and `name`
was given, it is returned unchanged. If `name` was empty or '0.0.0.0',
hostname from gethostname() is returned.
"""
name = name.strip()
if not name or name == '0.0.0.0':
Expand Down