Skip to content

Commit 87dbc05

Browse files
committed
Merge remote branch into oauth2
2 parents b791f8a + 317daed commit 87dbc05

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_client.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
except: # Python 3
77
from urllib.parse import urljoin
88
import time
9-
try:
10-
FileNotFoundError # Python 3
11-
except NameError:
12-
FileNotFoundError = IOError # Python 2
139

1410
import requests
1511

@@ -49,12 +45,14 @@ def load_conf(filename):
4945
"placeholder": null
5046
}
5147
"""
52-
try:
48+
conf = {}
49+
if os.path.exists(filename):
5350
with open(filename) as f:
5451
conf = json.load(f)
55-
except FileNotFoundError:
56-
raise unittest.SkipTest(
57-
"Unable to open/read JSON configuration %s" % filename)
52+
else:
53+
# Do not raise unittest.SkipTest(...) here,
54+
# because it would still be considered as Test Error in Python 2
55+
logger.warning("Unable to locate JSON configuration %s" % filename)
5856
openid_configuration = {}
5957
if "oidp" in conf:
6058
try:

0 commit comments

Comments
 (0)