From bf8ae91f2899bf29a1579101913e6de2786a0594 Mon Sep 17 00:00:00 2001
From: Christoph Lehmann <christoph.lehmann@ufz.de>
Date: Thu, 9 Jun 2016 09:54:52 +0200
Subject: [PATCH] [scr/doc] fixed python format strings

---
 scripts/doc/append-xml-tags.py       | 6 +++---
 scripts/doc/normalize-param-cache.py | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/doc/append-xml-tags.py b/scripts/doc/append-xml-tags.py
index 4d8ff5284dd..a6e6b4b27c6 100755
--- a/scripts/doc/append-xml-tags.py
+++ b/scripts/doc/append-xml-tags.py
@@ -18,7 +18,7 @@ github_data_url = "https://github.com/ufz/ogs-data/tree/master"
 
 if len(sys.argv) != 4:
     print("Usage:")
-    print("{} EXT DATADIR DOCAUXDIR".format(sys.argv[0]))
+    print("{0} EXT DATADIR DOCAUXDIR".format(sys.argv[0]))
     sys.exit(1)
 
 ext       = sys.argv[1]
@@ -152,9 +152,9 @@ for (dirpath, _, filenames) in os.walk(docdir):
                             fh.write("- This is a required parameter.\n")
 
                         datatype = info[5]
-                        if datatype: fh.write("- Data type: <tt>{}</tt>\n".format(datatype))
+                        if datatype: fh.write("- Data type: <tt>{0}</tt>\n".format(datatype))
 
-                        fh.write("- Expanded tag path: {}\n".format(tagpath_expanded))
+                        fh.write("- Expanded tag path: {0}\n".format(tagpath_expanded))
 
                         fh.write("- Go to source code: [&rarr; ufz/ogs/master]({2}/{0}#L{1})\n"
                                 .format(path, line, github_src_url))
diff --git a/scripts/doc/normalize-param-cache.py b/scripts/doc/normalize-param-cache.py
index 942c5efe1fc..91a70b09baf 100755
--- a/scripts/doc/normalize-param-cache.py
+++ b/scripts/doc/normalize-param-cache.py
@@ -51,7 +51,7 @@ for inline in sys.stdin:
 
         param_or_attr_comment = m.group(1)
         tag_path_comment = m.group(2).replace("__", ".")
-        debug(" {:>5}  //! {}".format(lineno, tag_path_comment))
+        debug(" {0:>5}  //! {1}".format(lineno, tag_path_comment))
         tag_name_comment = tag_path_comment.split(".")[-1]
 
         continue
@@ -83,7 +83,7 @@ for inline in sys.stdin:
         if state != "comment" or oldpath != path:
             write_out("NODOC", path, lineno, "NONE", param, paramtype, method)
         else:
-            debug(" {:>5}  {} {} ".format(lineno, param, paramtype))
+            debug(" {0:>5}  {1} {2} ".format(lineno, param, paramtype))
 
             if param != tag_name_comment:
                 debug("error: parameter name from comment and code do not match: "
@@ -91,7 +91,7 @@ for inline in sys.stdin:
                 write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method)
             elif lineno != oldlineno+1:
                 debug("error: the associated comment is not on the line preceding this one."
-                        + " line numbers {} vs. {}".format(oldlineno, lineno))
+                        + " line numbers {0} vs. {1}".format(oldlineno, lineno))
                 write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method)
             elif param_or_attr_comment == "param" and m.group(2) != "Param" and m.group(2) != "Subtree":
                 debug("error: comment says param but code says different.")
@@ -118,7 +118,7 @@ for inline in sys.stdin:
         else:
             if lineno != oldlineno+1:
                 debug("error: the associated comment is not on the line preceding this one."
-                        + " line numbers {} vs. {}".format(oldlineno, lineno))
+                        + " line numbers {0} vs. {1}".format(oldlineno, lineno))
                 write_out("NODOC", path, lineno, "UNKNOWN", "UNKNOWN", paramtype, method)
             elif param_or_attr_comment != "special":
                 debug("error: comment does not comment a special line.")
-- 
GitLab