fix: Fixed config parsing and the associated error message

chrisr3d 2019-10-31 11:52:34 +01:00
parent 4f70011edf
commit 4411166b43
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ def handler(q=False):
misperrors['error'] = "Unsupported attributes type"
return misperrors
if not request.get('config') and not (request['config'].get('apikey') and request['config'].et('url')):
misperrors['error'] = 'EUPI authentication is missing'
if not request.get('config') or (not request['config'].get('server') and not request['config'].get('port')):
misperrors['error'] = 'Whois local instance address is missing'
return misperrors
uwhois = Uwhois(request['config']['server'], int(request['config']['port']))