File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed
Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change 1919 REQUEST_TIMEOUT_DEFAULT ,
2020 BATCH_REQ_TIMEOUT_DEFAULT ,
2121 cache_key ,
22- read_json_file ,
2322)
2423from . import handler_utils
2524from .bogon import is_bogon
Original file line number Diff line number Diff line change 2323 REQUEST_TIMEOUT_DEFAULT ,
2424 BATCH_REQ_TIMEOUT_DEFAULT ,
2525 cache_key ,
26- read_json_file ,
2726)
2827from . import handler_utils
2928from .bogon import is_bogon
Original file line number Diff line number Diff line change @@ -97,18 +97,11 @@ def read_coords(location):
9797
9898
9999def read_json_file (json_file ):
100- try :
101- if not json_file :
102- return None
103- json_file_path = os .path .join (os .path .dirname (__file__ ), json_file )
104- with open (json_file_path , encoding = "utf8" ) as f :
105- json_data = f .read ()
106- if not json_data :
107- return None
108- return json .loads (json_data )
109-
110- except FileNotFoundError :
111- return None
100+ json_file = os .path .join (os .path .dirname (__file__ ), json_file )
101+ with open (json_file , encoding = "utf8" ) as f :
102+ json_data = f .read ()
103+
104+ return json .loads (json_data )
112105
113106
114107def return_or_fail (raise_on_fail , e , v ):
You can’t perform that action at this time.
0 commit comments