From 838e471c9e1e3d70adcd97c37a31fdedbe1b5ec4 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Tue, 31 Jul 2018 08:44:21 -0400 Subject: [PATCH] added unique key. --- reporting/server_compare.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reporting/server_compare.py b/reporting/server_compare.py index 69c47c6..ac7f0c9 100644 --- a/reporting/server_compare.py +++ b/reporting/server_compare.py @@ -123,17 +123,23 @@ def org_diff(lst_dicts, media_type, main_server): combined.pop(x) missing = [] + unique = [] print('...finding {}s missing from {}'.format( mtype, main_server)) for x in combined: if main_server not in x['server']: missing.append(x) + elif main_server in x['server'] and len(x['server']) == 1: + unique.append(x) diff_dict[mtype] = {'missing': {'count': len(missing), - 'list': missing}} - + 'list': missing}} diff_dict[mtype].update({'combined': {'count': len(combined), 'list': combined}}) + print('...finding {}s unique to {}'.format( + mtype, main_server)) + diff_dict[mtype].update({'unique': {'count': len(unique), + 'list': unique}}) return diff_dict