cloudflare/fqdns.py: fix filtering by type

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-10-20 20:25:49 +02:00
parent b0d91bf3d5
commit 5406e42d58
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931

View File

@ -15,7 +15,7 @@ def format_csv(record):
)
def format_table(record):
return '{:>20} {:1} {:>6} {:30} {:30}'.format(
return '{:>20} {:1} {:>6} {:30} {}'.format(
record['id'],
('P' if record['proxied'] else ''),
record['type'],
@ -52,6 +52,8 @@ def main():
formatter = format_csv
for r in records:
if opts.type and r['type'] != opts.type:
continue
print(formatter(r))
if __name__ == '__main__':