def verify_file(self, path, destination, verify='<STR_LIT:none>'):
content = from_file(path)<EOL>log.info('<STR_LIT>' % verify)<EOL>if verify == '<STR_LIT>':<EOL><INDENT>data = self.download_file(destination)<EOL>if content != data:<EOL><INDENT>log.error('<STR_LIT>')<EOL>raise VerificationError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>log.info('<STR_LIT>')<EOL><DEDENT><DEDENT>elif verify == '<STR_LIT>':<EOL><INDENT>data = self.__exchange('<STR_LIT>'+destination+'<STR_LIT>').splitlines()[<NUM_LIT:1>]<EOL>log.info('<STR_LIT>', data)<EOL>filehashhex = hashlib.sha1(content.encode(ENCODING)).hexdigest()<EOL>log.info('<STR_LIT>', filehashhex)<EOL>if data != filehashhex:<EOL><INDENT>log.error('<STR_LIT>')<EOL>raise VerificationError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>log.info('<STR_LIT>')<EOL><DEDENT><DEDENT>elif verify != '<STR_LIT:none>':<EOL><INDENT>raise Exception(verify + '<STR_LIT>')<EOL><DEDENT>
Tries to verify if path has same checksum as destination.
            Valid options for verify is 'raw', 'sha1' or 'none'