[damned-lies] Allow to specify custom path for itstool



commit b9065a71818e3af514de3dfd88bb24e647da035a
Author: Claude Paroz <claude 2xlibre net>
Date:   Fri May 20 09:44:11 2011 +0200

    Allow to specify custom path for itstool

 stats/utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index e4a6780..6245f6b 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -150,6 +150,7 @@ def check_potfiles(po_path):
 def generate_doc_pot_file(vcs_path, potbase, moduleid, verbose):
     """ Return the pot file for a document-type domain, and the error if any """
 
+    itstool_path = getattr(settings, 'ITSTOOL_PATH', '')
     extract_tools = {
         'xml2po':  {
             'command' : "cd \"%(dir)s\" && xml2po %(opts)s -o %(potfile)s -e %(files)s",
@@ -157,7 +158,7 @@ def generate_doc_pot_file(vcs_path, potbase, moduleid, verbose):
             'incl_var': "DOC_PAGES",
         },
         'itstool': {
-            'command' : "cd \"%(dir)s\" && itstool -o %(potfile)s %(files)s",
+            'command' : "cd \"%%(dir)s\" && %sitstool -o %%(potfile)s %%(files)s" % itstool_path,
             'mod_var' : "HELP_ID",
             'incl_var': "HELP_FILES",
         },



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