def _validate_show_level(self, show_level): try: return Showlevel.from_str(show_level.strip().lower()) except exception.ArtifactUnsupportedShowLevel as e: raise webob.exc.HTTPBadRequest(explanation=e.message)