'Update country info on existing Nmap scan result documents'

def update_country(self, start, stop, code, create=False):

    name = self.globaldb.data.country_name_by_code(code)
    for colname in [self.colname_hosts, self.colname_oldhosts]:
        self.db[colname].update(self.searchrange(start, stop), {'$set': {'infos.country_code': code, 'infos.country_name': name}}, multi=True)
