summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDorinda Bassey <dorindabassey@gmail.com>2021-03-18 16:49:40 +0100
committerSteve Sakoman <steve@sakoman.com>2021-03-24 04:30:32 -1000
commit92b2da5824c11063d0bb8e39bc221530137e29b4 (patch)
tree568ec3c443ec2906def6d5b231852eb0d757f8de
parent34e1adf61a84ad2e697112a7582d2d5dba3cd4cb (diff)
downloadopenembedded-core-contrib-92b2da5824c11063d0bb8e39bc221530137e29b4.tar.gz
devshell.bbclass: Exceptions displayed within devpyshell
If you type something into devpyshell, an exception should be triggered, but that exception isn't printed out because it is not being flushed out of the buffer. This patch fixes that issue. [YOCTO #12156] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9f95e82a3b27bfd5177a855326dcad8a5bdf5b2d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/devshell.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index fdf7dc100f..76dd0b42ee 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -128,6 +128,7 @@ def devpyshell(d):
more = i.runsource(source, "<pyshell>")
if not more:
buf = []
+ sys.stderr.flush()
prompt(more)
except KeyboardInterrupt:
i.write("\nKeyboardInterrupt\n")