From b7bfdd7afdaae171a388bc47ef0736bbea27df17 Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 27 Nov 2018 11:26:09 +0200 Subject: [PATCH] Quick move from unicode to text_type --- monkey/monkey_island/cc/services/report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/services/report.py b/monkey/monkey_island/cc/services/report.py index d8f9b9b96..38bf6fe79 100644 --- a/monkey/monkey_island/cc/services/report.py +++ b/monkey/monkey_island/cc/services/report.py @@ -424,7 +424,7 @@ class ReportService: ip_in_src = None ip_in_dst = None 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 break @@ -433,7 +433,7 @@ class ReportService: continue 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 break @@ -469,7 +469,7 @@ class ReportService: scans.rewind() # If we iterated over scans already we need to rewind. for scan in scans: 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']) cross_segment_ip = ReportService.get_ip_in_src_and_not_in_dst(monkey['ip_addresses'], source_subnet_range,