Friendlier connection error for docker-osx users
This commit is contained in:
parent
690a7d6dd7
commit
5126649de4
2 changed files with 14 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ from __future__ import division
|
|||
import datetime
|
||||
import os
|
||||
import socket
|
||||
import subprocess
|
||||
from .errors import UserError
|
||||
|
||||
|
||||
|
|
@ -108,3 +109,11 @@ def split_buffer(reader, separator):
|
|||
|
||||
if len(buffered) > 0:
|
||||
yield buffered
|
||||
|
||||
|
||||
def call_silently(*args, **kwargs):
|
||||
"""
|
||||
Like subprocess.call(), but redirects stdout and stderr to /dev/null.
|
||||
"""
|
||||
with open(os.devnull, 'w') as shutup:
|
||||
return subprocess.call(*args, stdout=shutup, stderr=shutup, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue