Quick move from unicode to text_type
This commit is contained in:
parent
f82069e9bf
commit
b7bfdd7afd
|
@ -424,7 +424,7 @@ class ReportService:
|
||||||
ip_in_src = None
|
ip_in_src = None
|
||||||
ip_in_dst = None
|
ip_in_dst = None
|
||||||
for ip_addr in monkey['ip_addresses']:
|
for ip_addr in monkey['ip_addresses']:
|
||||||
if source_subnet_range.is_in_range(unicode(ip_addr)):
|
if source_subnet_range.is_in_range(text_type(ip_addr)):
|
||||||
ip_in_src = ip_addr
|
ip_in_src = ip_addr
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ class ReportService:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for ip_addr in monkey['ip_addresses']:
|
for ip_addr in monkey['ip_addresses']:
|
||||||
if target_subnet_range.is_in_range(unicode(ip_addr)):
|
if target_subnet_range.is_in_range(text_type(ip_addr)):
|
||||||
ip_in_dst = ip_addr
|
ip_in_dst = ip_addr
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ class ReportService:
|
||||||
scans.rewind() # If we iterated over scans already we need to rewind.
|
scans.rewind() # If we iterated over scans already we need to rewind.
|
||||||
for scan in scans:
|
for scan in scans:
|
||||||
target_ip = scan['data']['machine']['ip_addr']
|
target_ip = scan['data']['machine']['ip_addr']
|
||||||
if target_subnet_range.is_in_range(unicode(target_ip)):
|
if target_subnet_range.is_in_range(text_type(target_ip)):
|
||||||
monkey = NodeService.get_monkey_by_guid(scan['monkey_guid'])
|
monkey = NodeService.get_monkey_by_guid(scan['monkey_guid'])
|
||||||
cross_segment_ip = ReportService.get_ip_in_src_and_not_in_dst(monkey['ip_addresses'],
|
cross_segment_ip = ReportService.get_ip_in_src_and_not_in_dst(monkey['ip_addresses'],
|
||||||
source_subnet_range,
|
source_subnet_range,
|
||||||
|
|
Loading…
Reference in New Issue