inspect/call the argparse method for each doctype

This commit is contained in:
Martin A. Brown 2016-02-25 10:38:38 -08:00
parent 81375b84c5
commit b86f92f742
1 changed files with 4 additions and 4 deletions

View File

@ -51,10 +51,10 @@ def collectconfiguration(tag, argv):
# -- collect up the distributed configuration fragments
#
for module in tldp.typeguesser.knowndoctypemodules:
config_fragment = getattr(module, 'config_fragment', None)
if config_fragment:
config_fragment(ap)
for cls in tldp.typeguesser.knowndoctypes:
argparse_method = getattr(cls, 'argparse', None)
if argparse_method:
argparse_method(ap)
cc = CascadingConfig(tag, ap, argv)
config, args = cc.parse()