From 94b895ae7c6bc9a6ce6fcb3a5ab922ca10361463 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Wed, 6 Jun 2018 11:47:43 +0200 Subject: [PATCH] [core] use logging to report plugin loading errors --- meshroom/core/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/core/__init__.py b/meshroom/core/__init__.py index 50a06c67..969b99f8 100644 --- a/meshroom/core/__init__.py +++ b/meshroom/core/__init__.py @@ -66,12 +66,12 @@ def loadPlugins(folder, packageName, classType): a.packageVersion = packageVersion nodeTypes.extend(p) except Exception as e: - errors.append(' * Errors while loading "{}".\n File: {}\n {}'.format(pluginName, pluginFile, str(e))) + errors.append(' * {}: {}'.format(pluginName, str(e))) if errors: - print('== Error while loading the following plugins: ==') - print('\n'.join(errors)) - print('================================================') + logging.warning('== Error while loading the following plugins ==\n' + '{}\n' + .format('\n'.join(errors))) return nodeTypes