From 2206012d676e2500b6ba5e11f46217654f6d61c1 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 17 Aug 2009 21:20:22 +0200 Subject: [PATCH] Fix all macro arguments (need * and **) --- macros/CgiVar.py | 4 ++-- macros/HttpGet.py | 4 ++-- macros/HttpPost.py | 2 +- macros/TitleIndex.py | 2 +- macros/WordIndex.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/macros/CgiVar.py b/macros/CgiVar.py index 867bc87..9708778 100644 --- a/macros/CgiVar.py +++ b/macros/CgiVar.py @@ -1,7 +1,7 @@ -def _macro_CgiVar(argv, kvargs): +def _macro_CgiVar(*args, *kvargs): return { 'REMOTE_USER': remote_user(), 'REMOTE_HOST': get_hostname(remote_host()), 'REMOTE_ADDR': remote_host(), 'QUERY_STRING': relative_url(query_string()), - }[argv[1]] + }[args[1]] diff --git a/macros/HttpGet.py b/macros/HttpGet.py index 391a144..bc122a9 100644 --- a/macros/HttpGet.py +++ b/macros/HttpGet.py @@ -1,6 +1,6 @@ -def _macro_HttpGet(args, kvargs): +def _macro_HttpGet(*args, **kvargs): if args[1] in form: - return form[argv[1]].value + return form[args[1]].value elif len(args) > 2: return args[2] # default value raise Exception("Undefined argument " + args[1]) diff --git a/macros/HttpPost.py b/macros/HttpPost.py index b7037c1..6bd5874 100644 --- a/macros/HttpPost.py +++ b/macros/HttpPost.py @@ -1,4 +1,4 @@ -def _macro_HttpPost(args, kvargs): +def _macro_HttpPost(*args, *kvargs): if args[1] in form: return form[argv[1]].value elif len(args) > 2: diff --git a/macros/TitleIndex.py b/macros/TitleIndex.py index 7212f2b..3754396 100644 --- a/macros/TitleIndex.py +++ b/macros/TitleIndex.py @@ -1,4 +1,4 @@ -def _macro_TitleIndex(args, kvargs): +def _macro_TitleIndex(*args, **kvargs): s = make_index_key() pages = list(page_list()) pages.sort() diff --git a/macros/WordIndex.py b/macros/WordIndex.py index 10fb346..b64a317 100644 --- a/macros/WordIndex.py +++ b/macros/WordIndex.py @@ -1,4 +1,4 @@ -def _macro_WordIndex(args, kvargs): +def _macro_WordIndex(*args, **kvargs): s = make_index_key() pages = list(page_list()) map = {} -- 2.25.1