tests: skip_if_no_ssl decorator always returned None
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# package is named tests, not test, so it won't be confused with test in stdlib
|
||||
import sys
|
||||
import os
|
||||
import errno
|
||||
import os
|
||||
import unittest
|
||||
import warnings
|
||||
|
||||
from eventlet import debug, hubs
|
||||
|
||||
|
||||
# convenience for importers
|
||||
main = unittest.main
|
||||
|
||||
@@ -114,11 +114,13 @@ def skip_if_no_ssl(func):
|
||||
""" Decorator that skips a test if SSL is not available."""
|
||||
try:
|
||||
import eventlet.green.ssl
|
||||
return func
|
||||
except ImportError:
|
||||
try:
|
||||
import eventlet.green.OpenSSL
|
||||
return func
|
||||
except ImportError:
|
||||
skipped(func)
|
||||
return skipped(func)
|
||||
|
||||
|
||||
class TestIsTakingTooLong(Exception):
|
||||
|
Reference in New Issue
Block a user