[damned-lies] Provide for the case when includes are None



commit c56daf81d174dcffa39e122c107ca6ed7e8fbd86
Author: Claude Paroz <claude 2xlibre net>
Date:   Fri Sep 24 14:36:14 2010 +0200

    Provide for the case when includes are None

 stats/utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 4531979..3d4929a 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -138,7 +138,8 @@ def generate_doc_pot_file(vcs_path, potbase, moduleid, verbose):
         files = [modulename + ".xml"]
         includes = read_makefile_variable([vcs_path], "DOC_INCLUDES")
 
-    files.extend(filter(lambda x:x not in ("", "$(NULL)"), includes.split()))
+    if includes:
+        files.extend(filter(lambda x:x not in ("", "$(NULL)"), includes.split()))
     files = " ".join([os.path.join("C", f) for f in files])
     potfile = os.path.join(vcs_path, "C", potbase + ".pot")
     command = "cd \"%s\" && xml2po %s -o %s -e %s" % (vcs_path, xml2po_options, potfile, files)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]