'This method opens a scan result, and calls the appropriate
store_scan_* method to parse (and store) the scan result.'

def store_scan(self, fname, **kargs):

    scanid = utils.hash_file(fname, hashtype='sha256')
    if self.is_scan_present(scanid):
        utils.LOGGER.debug('Scan    already    present    in    Database    (%r).', fname)
        return False
    with utils.open_file(fname) as fdesc:
        fchar = fdesc.read(1)
    try:
        store_scan_function = {'<': self.store_scan_xml, '{': self.store_scan_json}[fchar]
    except KeyError:
        raise ValueError(('Unknown    file    type    %s' % fname))
    return store_scan_function(fname, filehash=scanid, **kargs)
