other minor tweaks - doc generation should still be broken
authorparmentelat <thierry.parmentelat@inria.fr>
Sun, 20 May 2018 12:40:59 +0000 (14:40 +0200)
committerparmentelat <thierry.parmentelat@inria.fr>
Sun, 20 May 2018 12:40:59 +0000 (14:40 +0200)
PLC/Methods/__init__.py
doc/DocBookLocal.py

index dbf9959..000edba 100644 (file)
@@ -20,7 +20,6 @@ contents = [
 for dir, pattern in contents:
     prefix = len(dir) + 1
     matches = glob.glob("{}/{}".format(dir, pattern))
 for dir, pattern in contents:
     prefix = len(dir) + 1
     matches = glob.glob("{}/{}".format(dir, pattern))
-    print(matches)
     for match in matches:
         filename = match[prefix:][:-3]
         python_name = filename if dir == '.' \
     for match in matches:
         filename = match[prefix:][:-3]
         python_name = filename if dir == '.' \
index 317330e..2bed21a 100755 (executable)
@@ -14,13 +14,14 @@ for method in methods:
     try:
         good_api = api.callable(method)
         good_apis.append(good_api)
     try:
         good_api = api.callable(method)
         good_apis.append(good_api)
-    except PLCInvalidAPIMethod, e:
-        bad_apis.append((method,e))
+    except PLCInvalidAPIMethod as exc:
+        bad_apis.append((method, exc))
 
 DocBook(good_apis).Process()
 
 
 DocBook(good_apis).Process()
 
-if len(bad_apis):
-    sys.stderr.write("UNEXPECTED: There are %d non-callable methods:\n"%(len(bad_apis)))
-    for bad_api,e in bad_apis:
-        sys.stderr.write("\t%s:%s\n" % (bad_api,e))
+if bad_apis:
+    sys.stderr.write("UNEXPECTED: There are %d non-callable methods:\n"
+                     % (len(bad_apis)))
+    for method, exc in bad_apis:
+        sys.stderr.write("\tmethod=<%s> exc=%s\n" % (method, exc))
     sys.exit(-1)
     sys.exit(-1)