diff --git a/pylast/__init__.py b/pylast/__init__.py index 5f96c88..ed200cf 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -51,6 +51,7 @@ def _can_use_ssl_securely(): v = sys.version_info return v > (3, 3) or ((2, 7, 9) < v < (3, 0)) + if _can_use_ssl_securely(): import ssl diff --git a/tests/test_pylast.py b/tests/test_pylast.py index a1b6fa5..fbac259 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -2172,7 +2172,8 @@ class TestPyLast(unittest.TestCase): msg = str(exc) # Assert - self.assertEqual(msg, "Invalid authentication token supplied") + self.assertEqual(msg, + "Unauthorized Token - This token has not been issued") @flaky(max_runs=5, min_passes=1)