]> code.ossystems Code Review - openembedded-core.git/commitdiff
devshell.bbclass: Exceptions displayed within devpyshell
authorDorinda Bassey <dorindabassey@gmail.com>
Thu, 18 Mar 2021 15:49:40 +0000 (16:49 +0100)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 9 Apr 2021 05:56:16 +0000 (13:56 +0800)
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: Anuj Mittal <anuj.mittal@intel.com>
meta/classes/devshell.bbclass

index fdf7dc100fa8e34c01032f21f478b69cf0ef3bf2..76dd0b42eea2aef64010b37cb976fdedc1af308c 100644 (file)
@@ -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")