File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ def report() -> Response:
134
134
135
135
out_file = RISK_REPORT_DIR / f'{ datetime .now ().strftime ("%Y-%m-%d" )} _{ gethostname ()} .txt'
136
136
with report_lock :
137
- with open (out_file , 'a+' , encoding = 'utf-8' ) as f :
138
- f .write (json_dumps (r ) + '\n ' )
137
+ with open (out_file , 'a+' , encoding = 'utf-8' ) as fo :
138
+ fo .write (json_dumps (r ) + '\n ' )
139
139
140
140
return _response_json (code = 200 , data = {'msg' : 'Reported' })
141
141
@@ -182,6 +182,7 @@ def check_net(ip) -> Response:
182
182
net = f"{ net } /{ NET_SIZE [ipv ]} "
183
183
184
184
try :
185
+ # pylint: disable=E0606
185
186
return _response_json (code = 200 , data = {** NET_DATA [ipv ][net ], 'network' : net })
186
187
187
188
except KeyError :
@@ -194,6 +195,7 @@ def check_asn(nr) -> Response:
194
195
return _response_json (code = 400 , data = {'msg' : 'Invalid ASN provided' })
195
196
196
197
try :
198
+ # pylint: disable=E0606
197
199
return _response_json (code = 200 , data = ASN_DATA [str (nr )])
198
200
199
201
except KeyError :
You can’t perform that action at this time.
0 commit comments