def get_hash_from_file(hash_path, dvd_basename):
 hash_file = open(hash_path, 'r')
 for line in hash_file.readlines():
  if (dvd_basename in line):
   return line.split()[0]

def get_hash_from_file ( hash_path , dvd_basename ) : hash_file = open ( hash_path , 'r' ) for line in hash_file . readlines ( ) : if ( dvd_basename in line ) : return line . split ( ) [ 0 ]
get the a hash from a given dvd image from a hash file .