From f7d6406d387f6acb78ac53f75ec5fd391e6b32cd Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Wed, 22 Feb 2017 22:07:17 +0100 Subject: [PATCH] Work around https://github.com/travis-ci/travis-ci/issues/3080 as pypy throws if 'ping' can't be executed --- testscour.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testscour.py b/testscour.py index 6daec27..ace070e 100755 --- a/testscour.py +++ b/testscour.py @@ -2434,6 +2434,11 @@ class EmbedRasters(unittest.TestCase): import os import platform + # work around https://github.com/travis-ci/travis-ci/issues/3080 as pypy throws if 'ping' can't be executed + import distutils.spawn + if not distutils.spawn.find_executable('ping'): + return -1 + system = platform.system().lower() ping_count = '-n' if system == 'windows' else '-c' dev_null = 'NUL' if system == 'windows' else '/dev/null'