def find_initrd(path):
 if (path is None):
  return None
 if os.path.isfile(path):
  return path
 elif os.path.isdir(path):
  return find_highest_files(path, 'initrd.img', _re_initrd)
 elif (file_is_remote(path) and remote_file_exists(path)):
  return path
 return None

def find_initrd ( path ) : if ( path is None ) : return None if os . path . isfile ( path ) : return path elif os . path . isdir ( path ) : return find_highest_files ( path , 'initrd.img' , _re_initrd ) elif ( file_is_remote ( path ) and remote_file_exists ( path ) ) : return path return None
given a directory or a filename .