예제 #1
0
 def validate(value):
     try:
         validate.url_path(value)
     except exceptions.InvalidURLPath:
         error = 'Value must be a valid URL Path string'
         raise ValueError(error)
     return value
예제 #2
0
파일: types.py 프로젝트: openstack/octavia
 def validate(value):
     try:
         validate.url_path(value)
     except exceptions.InvalidURLPath:
         error = 'Value must be a valid URL Path string'
         raise ValueError(error)
     return value