

def WriteFileHash(self, path, hash_value):
    'Writes the file path and hash to stdout.\n\n    Args:\n      path: the path of the file.\n      hash_value: the message digest hash calculated over the file data.\n    '
    string = '{0:s}\t{1:s}'.format(hash_value, path)
    try:
        encoded_string = string.encode(self._encoding, errors=string._errors)
    except UnicodeEncodeError:
        if (self._errors == 'strict'):
            logging.error('Unable to properly write output due to encoding error. Switching to error tolerant encoding which can result in non Basic Latin (C0) characters to be replaced with "?" or "\\ufffd".')
            self._errors = 'replace'
        encoded_string = string.encode(self._encoding, errors=self._errors)
    print(encoded_string)

dataset/ETHPy150Open log2timeline/dfvfs/examples/recursive_hasher.py StdoutWriter.WriteFileHash/VarMisuse@43/130 `self`->`string`