Changeset 714

Show
Ignore:
Timestamp:
05/23/07 12:31:44 (6 years ago)
Author:
ggpolo
Message:

small changes in dbdatahandler.py

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/umitdb/datahandler/dbdatahandler.py

    r713 r714  
    105105             
    106106            #print "Comment:", host.comment 
    107             temp_d["distance"] = 'Empty' 
     107            temp_d["distance"] = empty() 
    108108            temp_d["uptime"] = host.uptime["seconds"] 
    109109            temp_d["lastboot"] = host.uptime["lastboot"] 
     
    203203        scan_d["args"] = parsedsax.nmap["nmaprun"]["args"] 
    204204        scan_d["start"] = parsedsax.nmap["nmaprun"]["start"] 
    205         scan_d["startstr"] = 'Empty' 
     205        scan_d["startstr"] = empty() 
    206206        scan_d["finish"] = parsedsax.nmap["runstats"]["finished_time"] 
    207         scan_d["finishstr"] = 'Empty' 
     207        scan_d["finishstr"] = empty() 
    208208        scan_d["xmloutputversion"] = parsedsax.nmap["nmaprun"]["xmloutputversion"] 
    209209        if self.store_original: 
     
    211211                                                 'r').readlines()) 
    212212        else: 
    213             scan_d["xmloutput"] = 'Empty' 
     213            scan_d["xmloutput"] = empty() 
    214214 
    215215        scan_d["verbose"] = parsedsax.nmap["verbose"] 
     
    344344        Create new record in osmatch with data from osmatch dict. 
    345345        """ 
    346         osmatch["line"] = 'Empty' # check this, it seems parser isnt  
     346        osmatch["line"] = empty() # check this, it seems parser isnt  
    347347                                  # storing this 
    348348 
     
    421421        service_name_id = self.get_service_name_id_from_db(info["service_name"]) 
    422422        # NOT USING ostype FOR NOW 
    423         info["ostype"] = 'Empty' 
     423        info["ostype"] = empty() 
    424424 
    425425        data = (info["service_product"], info["service_version"], 
     
    501501        """ 
    502502        if not address["vendor"]: 
    503             vendor = 'Empty' 
     503            vendor = empty() 
    504504        else: 
    505505            vendor = address["vendor"] 
     
    900900    def parse(self, valid_xml): 
    901901        """ 
    902         Parses an existent xml file. 
     902        Parses an existing xml file. 
    903903        """ 
    904904        p = NmapParser(valid_xml) 
     
    925925        """ 
    926926        Call this to normalize a dict. What it does: any empty value  
    927         will be changed to 'Empty'. 
     927        will be changed to return value of empty(). 
    928928        """ 
    929929        # normalize hosts