LGTM fixes

This commit is contained in:
Khanh Ngo 2019-12-16 16:27:18 +07:00
parent f5b88ebc73
commit 3e961d7b21
No known key found for this signature in database
GPG Key ID: D5FAA6A16150E49E
3 changed files with 1 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class Record(object):
current_app.logger.error( current_app.logger.error(
"Cannot fetch domain's record data from remote powerdns api. DETAIL: {0}" "Cannot fetch domain's record data from remote powerdns api. DETAIL: {0}"
.format(e)) .format(e))
return False return []
return jdata['rrsets'] return jdata['rrsets']

View File

@ -1,4 +1,3 @@
import re
import json import json
import traceback import traceback
from ast import literal_eval from ast import literal_eval

View File

@ -326,7 +326,6 @@ def signin_history(username, authenticator, success):
request_ip = request.remote_addr request_ip = request.remote_addr
# Write log # Write log
str_success = 'succeeded' if success else 'failed'
if success: if success:
str_success = 'succeeded' str_success = 'succeeded'
current_app.logger.info( current_app.logger.info(