def convert_status_value(value, projects, user, environments): parsed = [] for status in value: try: parsed.append(parse_status_value(status)) except ValueError: raise InvalidSearchQuery(f"invalid status value of '{status}'") return parsed
def convert_status_value(value, projects, user, environments): try: return parse_status_value(value) except ValueError: raise InvalidSearchQuery(u"invalid status value of '{}'".format(value))