diff --git a/modules/expansion/ipasn.py b/modules/expansion/ipasn.py index 53c2e8ba..28bc7b7a 100755 --- a/modules/expansion/ipasn.py +++ b/modules/expansion/ipasn.py @@ -33,7 +33,8 @@ def handler(q=False): ipasn = IPASN(host=request['config'].get('host'), port=request['config'].get('port'), db=request['config'].get('db')) - values = ' \n '.join([' '.join(r)for r in ipasn.aggregate_history(toquery)]) + values = ['{} {} {} {}'.format(*r) for r in ipasn.aggregate_history(toquery)] + if not values: misperrors['error'] = 'Unable to find the history of this IP' return misperrors