def _urlpath_validate(self, proposal): if proposal['value'].endswith('/'): raise TraitError("urlpath cannot end with a /") return proposal['value']