From 25714bba29a14815816dd128db589859f7085504 Mon Sep 17 00:00:00 2001 From: mementum Date: Sat, 9 Apr 2016 11:53:18 +0200 Subject: [PATCH] Stop spurious "Generating ..." output and make it part of logger.debug --- comtypes/client/_generate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comtypes/client/_generate.py b/comtypes/client/_generate.py index f4f5fcfd..ab54bfc6 100644 --- a/comtypes/client/_generate.py +++ b/comtypes/client/_generate.py @@ -127,8 +127,8 @@ def GetModule(tlib): else: return mod # the module is always regenerated if the import fails - if __verbose__: - print "# Generating comtypes.gen.%s" % modulename + logger.debug("# Generating comtypes.gen.%s", modulename) + # determine the Python module name fullname = _name_module(tlib) modname = fullname.split(".")[-1] @@ -171,8 +171,8 @@ def _CreateWrapper(tlib, pathname=None): else: ofi = open(os.path.join(comtypes.client.gen_dir, modname + ".py"), "w") # XXX use logging! - if __verbose__: - print "# Generating comtypes.gen.%s" % modname + logger.debug("# Generating comtypes.gen.%s", modname) + generate_module(tlib, ofi, pathname) if comtypes.client.gen_dir is None: