X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=doc%2FDocBookLocal.py;h=12906102e5e153f91bad076f9000fa389f331583;hb=3cdf2e7bfccc337c7d5cdf13c43224973ddbc795;hp=4a029d2f784768106d61c8887b9b3d3daf7b676f;hpb=79514a4adcf7b4bd711ab384bc0c7cd11077a9b7;p=plcapi.git diff --git a/doc/DocBookLocal.py b/doc/DocBookLocal.py old mode 100644 new mode 100755 index 4a029d2..1290610 --- a/doc/DocBookLocal.py +++ b/doc/DocBookLocal.py @@ -1,7 +1,25 @@ +#!/usr/bin/env python from PLC.API import PLCAPI +from PLC.Faults import PLCInvalidAPIMethod +from DocBook import DocBook +import sys +api = PLCAPI(None) +methods = api.all_methods +good_apis = [] +bad_apis = [] +for method in methods: + try: + good_api = api.callable(method) + good_apis.append(good_api) + except PLCInvalidAPIMethod, e: + bad_apis.append((method,e)) -def get_func_list(): - api = PLCAPI(None) - return [api.callable(method) for method in api.methods] +DocBook(good_apis).Process() + +if len(bad_apis): + sys.stderr.write("UNEXPECTED: There are %d non-callable methods:\n") + for bad_api,e in bad_apis: + sys.stderr.write("\t%s:%s\n" % (bad_api,e)) + sys.exit(-1)