def should_check():
 filename = cache_file()
 if (not filename):
  return False
 if (read(filename).strip() == 'never'):
  return False
 return (time.time() > (last_check() + update_freq))

def should_check ( ) : filename = cache_file ( ) if ( not filename ) : return False if ( read ( filename ) . strip ( ) == 'never' ) : return False return ( time . time ( ) > ( last_check ( ) + update_freq ) )
return true if we should check for an update .