summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@gmail.com>2018-11-09 13:30:06 +0000
committerValentin David <valentin.david@gmail.com>2018-11-09 13:30:06 +0000
commit62f59eaa7a8896ad7709224d4506a1d21c5fb021 (patch)
treee2819978f028c0908e3ada5a0f4cf3c967650875
parentd153453cf927042e33bdb756407cda3977e66707 (diff)
parent7738f6df9c1a92f1fb32eb49604bc4b2357b5b12 (diff)
downloadbuildstream-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.py3
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(