#NEWLINE# def _set_hash( self ) : #NEWLINE# #INDENT# if ( not self . data_file ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# file_exists = self . data_file . storage . exists ( self . data_file . name ) #NEWLINE# if ( ( file_exists and ( self . data_file . name != '' ) ) or ( ( not file_exists ) and self . data_file ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . data_file . seek ( os . SEEK_SET ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . file_hash = ( 'md5:%s' % md5 ( self . data_file . read ( ) ) . hexdigest ( ) ) #NEWLINE# return self . file_hash #NEWLINE# #UNINDENT# #UNINDENT# return ''