mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-08 22:36:48 +02:00
fix key error if tcp or udp don't exist
This commit is contained in:
@@ -121,7 +121,8 @@ def _process(proc_data):
|
||||
for item in proc_data[protocol + '_ranges']:
|
||||
port_set.update(range(item['start'], item['end'] + 1))
|
||||
|
||||
proc_data['normalized_' + protocol + '_list'] = sorted(set([p for p in proc_data[protocol + '_list'] if p not in port_set]))
|
||||
if protocol + '_list' in proc_data:
|
||||
proc_data['normalized_' + protocol + '_list'] = sorted(set([p for p in proc_data[protocol + '_list'] if p not in port_set]))
|
||||
|
||||
new_port_ranges = []
|
||||
state = 'findstart' # 'findstart' or 'findend'
|
||||
|
Reference in New Issue
Block a user