Skip to content

Commit

Permalink
[#690] Make things more explicit and remove %s
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jun 14, 2013
1 parent 96722a1 commit 8d4d6b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def url_for_static(*args, **kw):
def fix_arg(arg):
# make sure that if we specify the url that it is not unicode and
# starts with a /
arg = str(arg)
if not arg.startswith('/'):
arg = '/%s' % arg
return str(arg)
arg = '/' + arg
return arg

if args:
args = (fix_arg(args[0]), ) + args[1:]
Expand Down

0 comments on commit 8d4d6b6

Please sign in to comment.