bpo-40635: Fix getfqdn() docstring and docs (GH-27971)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fdcb675eed)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-08-26 12:55:22 -07:00 committed by GitHub
parent 970533e65c
commit f1e3fc4631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -781,8 +781,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. In case no FQDN is available, hostname
from gethostname() is returned.
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':