def has_required(programs):
 try:
  return check_required(programs)
 except exception.CommandNotFound:
  return False

def has_required ( programs ) : try : return check_required ( programs ) except exception . CommandNotFound : return False
same as check_required but returns false if not all commands exist .