File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 66except : # Python 3
77 from urllib .parse import urljoin
88import time
9- try :
10- FileNotFoundError # Python 3
11- except NameError :
12- FileNotFoundError = IOError # Python 2
139
1410import 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 :
You can’t perform that action at this time.
0 commit comments