Commit 2dfd1bd5 authored by Jim Fulton's avatar Jim Fulton

Changed value of ValidationError to Unauthorized.

parent 2519feb2
'''$Id: DT_Util.py,v 1.29 1998/03/26 16:09:11 jim Exp $''' '''$Id: DT_Util.py,v 1.30 1998/03/26 22:02:16 jim Exp $'''
############################################################################ ############################################################################
# Copyright # Copyright
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
# (540) 371-6909 # (540) 371-6909
# #
############################################################################ ############################################################################
__version__='$Revision: 1.29 $'[11:-2] __version__='$Revision: 1.30 $'[11:-2]
import sys, regex, string, types, math, os import sys, regex, string, types, math, os
from string import rfind, strip, joinfields, atoi,lower,upper,capitalize from string import rfind, strip, joinfields, atoi,lower,upper,capitalize
...@@ -62,7 +62,7 @@ from __builtin__ import * ...@@ -62,7 +62,7 @@ from __builtin__ import *
import VSEval import VSEval
ParseError='Document Template Parse Error' ParseError='Document Template Parse Error'
ValidationError='ValidationError' ValidationError='Unauthorized'
def int_param(params,md,name,default=0): def int_param(params,md,name,default=0):
try: v=params[name] try: v=params[name]
...@@ -99,7 +99,7 @@ def careful_getitem(md, mapping, key): ...@@ -99,7 +99,7 @@ def careful_getitem(md, mapping, key):
validate=md.validate validate=md.validate
if validate is None or validate(mapping,mapping,key,v,md): return v if validate is None or validate(mapping,mapping,key,v,md): return v
raise Validation, key raise ValidationError, key
def careful_getslice(md, seq, *indexes): def careful_getslice(md, seq, *indexes):
v=len(indexes) v=len(indexes)
...@@ -329,6 +329,9 @@ except: from pDocumentTemplate import InstanceDict, TemplateDict, render_blocks ...@@ -329,6 +329,9 @@ except: from pDocumentTemplate import InstanceDict, TemplateDict, render_blocks
############################################################################ ############################################################################
# $Log: DT_Util.py,v $ # $Log: DT_Util.py,v $
# Revision 1.30 1998/03/26 22:02:16 jim
# Changed value of ValidationError to Unauthorized.
#
# Revision 1.29 1998/03/26 16:09:11 jim # Revision 1.29 1998/03/26 16:09:11 jim
# *** empty log message *** # *** empty log message ***
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment