[damned-lies] Altering global variables is BAD (Fixes 656308)
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Altering global variables is BAD (Fixes 656308)
- Date: Wed, 10 Aug 2011 20:47:05 +0000 (UTC)
commit d14abc7c743111c8246927d713ef91c84d83bf2c
Author: Claude Paroz <claude 2xlibre net>
Date: Wed Aug 10 22:46:15 2011 +0200
Altering global variables is BAD (Fixes 656308)
stats/utils.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index c780d4f..b2ce1ef 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -184,6 +184,7 @@ def generate_doc_pot_file(vcs_path, potbase, moduleid):
files = ["index.page"]
if tool == "xml2po":
options = "-m mallard"
+ incl_var = extract_tools[tool]['incl_var']
else:
modulename = read_makefile_variable([vcs_path], "DOC_MODULE")
if not modulename:
@@ -201,9 +202,9 @@ def generate_doc_pot_file(vcs_path, potbase, moduleid):
errors.append(("error", ugettext_noop("DOC_MODULE doesn't point to a real file, probably a macro.")))
return "", errors, tool
files = [modulename + ".xml"]
- extract_tools[tool]['incl_var'] = "DOC_INCLUDES"
+ incl_var = "DOC_INCLUDES"
- includes = read_makefile_variable([vcs_path], extract_tools[tool]['incl_var'])
+ includes = read_makefile_variable([vcs_path], incl_var)
if includes:
files.extend(filter(lambda x:x not in ("", "$(NULL)"), includes.split()))
files = " ".join([os.path.join("C", f) for f in files])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]