Show error if organization name has invalid characters

This commit is contained in:
Christina Roberts
2012-12-10 15:19:34 -05:00
parent 495b58241c
commit 6acae5b440
3 changed files with 25 additions and 15 deletions

View File

@@ -153,7 +153,7 @@ class Location(_LocationBase):
def check(val, regexp):
if val is not None and regexp.search(val) is not None:
log.debug('invalid characters val="%s", list_="%s"' % (val, list_))
raise InvalidLocationError(location)
raise InvalidLocationError("Invalid characters in '%s'." % (val))
list_ = list(list_)
for val in list_[:4] + [list_[5]]: