File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
emission/net/ext_service/transit_matching Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 15
15
url = "https://lz4.overpass-api.de/"
16
16
17
17
try :
18
- query_file = open ('conf/net/ext_service/overpass_transit_stops_query_template' )
19
- except :
18
+ with open ('conf/net/ext_service/overpass_transit_stops_query_template' , 'r' , encoding = 'UTF-8' ) as query_file :
19
+ query_string = "" .join (query_file .readlines ())
20
+ except FileNotFoundError :
20
21
print ("transit stops query not configured, falling back to default" )
21
- query_file = open ('conf/net/ext_service/overpass_transit_stops_query_template.sample' )
22
-
23
- query_string = "" .join (query_file .readlines ())
22
+ with open ('conf/net/ext_service/overpass_transit_stops_query_template.sample' , 'r' , encoding = 'UTF-8' ) as query_file :
23
+ query_string = "" .join (query_file .readlines ())
24
24
25
25
RETRY = - 1
26
26
You can’t perform that action at this time.
0 commit comments