mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
failures gracefully
This commit is contained in:
parent
296aef8ebb
commit
dd2245f230
3 changed files with 17 additions and 5 deletions
|
@ -127,7 +127,10 @@ def choose_boundary():
|
|||
import time
|
||||
if _prefix is None:
|
||||
import socket
|
||||
hostid = socket.gethostbyname(socket.gethostname())
|
||||
try:
|
||||
hostid = socket.gethostbyname(socket.gethostname())
|
||||
except socket.gaierror:
|
||||
hostid = '127.0.0.1'
|
||||
try:
|
||||
uid = repr(os.getuid())
|
||||
except AttributeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue