<s> import hashlib <EOL> __author__ = '<STR_LIT>' <EOL> def calc_checksum ( filename ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> f = open ( filename , "<STR_LIT:rb>" ) <EOL> contents = f . read ( ) <EOL> m = hashlib . md5 ( ) <EOL> m . update ( contents ) <EOL> checksum = m . hexdigest ( ) <EOL> return checksum <EOL> except IOError : <EOL> return None </s>
