better URL errors, thanks Mariano

This commit is contained in:
Massimo Di Pierro
2012-04-07 20:04:32 -05:00
parent 50fde09299
commit 6bdaf9e8fb
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.7 (2012-04-07 19:55:06) dev
Version 1.99.7 (2012-04-07 20:04:15) dev
+3 -1
View File
@@ -261,6 +261,8 @@ def URL(
else:
raise SyntaxError, 'when calling URL, function or function name required'
elif '/' in f:
if f.startswith("/"):
f = f[1:]
items = f.split('/')
function = f = items[0]
args = items[1:] + args
@@ -277,7 +279,7 @@ def URL(
function2 = '%s.%s' % (function,extension or 'html')
if not (application and controller and function):
raise SyntaxError, 'not enough information to build the url'
raise SyntaxError, 'not enough information to build the url (%s %s %s)' % (application, controller, function)
if args:
if url_encode: