diff options
author | Valentin David <valentin.david@gmail.com> | 2018-11-09 13:30:06 +0000 |
---|---|---|
committer | Valentin David <valentin.david@gmail.com> | 2018-11-09 13:30:06 +0000 |
commit | 62f59eaa7a8896ad7709224d4506a1d21c5fb021 (patch) | |
tree | e2819978f028c0908e3ada5a0f4cf3c967650875 | |
parent | d153453cf927042e33bdb756407cda3977e66707 (diff) | |
parent | 7738f6df9c1a92f1fb32eb49604bc4b2357b5b12 (diff) | |
download | buildstream-62f59eaa7a8896ad7709224d4506a1d21c5fb021.tar.gz |
Merge branch 'danielsilverstone-ct/plugin-destroy-debug-to-stderr' into 'master'
plugin.py: Redirect DEBUG from `__del__` to `sys.stderr`
See merge request BuildStream/buildstream!944
-rw-r--r-- | buildstream/plugin.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py index 1b021d4b4..00e0ed795 100644 --- a/buildstream/plugin.py +++ b/buildstream/plugin.py @@ -111,6 +111,7 @@ Class Reference import os import subprocess +import sys from contextlib import contextmanager from weakref import WeakValueDictionary @@ -190,7 +191,7 @@ class Plugin(): # Dont send anything through the Message() pipeline at destruction time, # any subsequent lookup of plugin by unique id would raise KeyError. if self.__context.log_debug: - print("DEBUG: Destroyed: {}".format(self)) + sys.stderr.write("DEBUG: Destroyed: {}\n".format(self)) def __str__(self): return "{kind} {typetag} at {provenance}".format( |