mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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:
parent
9a79242567
commit
719af92e10
2 changed files with 6 additions and 4 deletions
|
@ -782,8 +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. 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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue