Index: MainWindow.py =================================================================== --- MainWindow.py (revision 28334) +++ MainWindow.py (working copy) @@ -840,10 +840,9 @@ def _load_diff_compare_cb (self, widget=None, extra=None): """Loads all active scans into a dictionary, passes it to the DiffWindow constructor, and then displays the 'Compare Results' window.""" - # We must change this test dict # This dict has the following syntax: - # key = Scan name - # value = nmap output in string format + # key = Unique scan name + # value = Parsed nmap result object dic = {} for parsed in self.scan_interface.inventory.get_scans(): @@ -852,8 +851,15 @@ else: scan_name = parsed.get_nmap_command() - dic[scan_name] = parsed + scan_id = 1 + dic_keys = dic.keys() + new_scan_name = scan_name + while new_scan_name in dic_keys: + new_scan_name = "%s (%s)" % (scan_name, scan_id) + scan_id += 1 + dic[new_scan_name] = parsed + self.diff_window = DiffWindow(dic) self.diff_window.show_all()