mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
conftest.py: Ignore KeyboardInterrupt (#3669)
conftest.py: Ignore KeyboardInterrupt
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Allow KeyboardInterrupt to cancel test suite checks for working internet and ssh
|
||||
@@ -39,6 +39,10 @@ def check_internet():
|
||||
for url in ("http://httpbin.org/ip", "http://clients3.google.com/generate_204"):
|
||||
try:
|
||||
try_internet(url)
|
||||
except KeyboardInterrupt:
|
||||
warnings.warn(
|
||||
"Skipped connecting to internet: {0}".format(url), RuntimeWarning
|
||||
)
|
||||
except Exception:
|
||||
warnings.warn(
|
||||
"Failed connecting to internet: {0}".format(url), RuntimeWarning
|
||||
@@ -59,6 +63,10 @@ def check_github_ssh():
|
||||
# return_code=255 and say 'Permission denied (publickey).'
|
||||
c = delegator.run('ssh -T git@github.com')
|
||||
res = True if c.return_code == 1 else False
|
||||
except KeyboardInterrupt:
|
||||
warnings.warn(
|
||||
"KeyboardInterrupt while checking GitHub ssh access", RuntimeWarning
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
global HAS_WARNED_GITHUB
|
||||
|
||||
Reference in New Issue
Block a user