Do not print error messages during plugin initialization to stdout.

This non-fatal warning emits output during calibredb commands and breaks
scripting.
This commit is contained in:
Eli Schwartz 2020-09-07 21:35:42 -04:00
parent 2302cb6a96
commit 14aa61d246
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -750,7 +750,7 @@ def initialize_plugins(perf=False):
times[plugin.name] = time.time() - st times[plugin.name] = time.time() - st
_initialized_plugins.append(plugin) _initialized_plugins.append(plugin)
except: except:
print('Failed to initialize plugin:', repr(zfp)) print('Failed to initialize plugin:', repr(zfp), file=sys.stderr)
if DEBUG: if DEBUG:
traceback.print_exc() traceback.print_exc()
# Prevent a custom plugin from overriding stdout/stderr as this breaks # Prevent a custom plugin from overriding stdout/stderr as this breaks