Skip to contentSkip to conversation

runqemu: do not check return code of tput

PATCH Superseded Chen Qi 2 participants 4 messages Jan 25, 2019 – Apr 11, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover runqemu: do not check return code of tput

*** BLURB HERE ***
The following changes since commit 1979d9162a335b7d4718a6697ca57bfa16237f0e:

bitbake: gitsmy.py: Fix unpack of submodules of submodules (2019-01-24 17:45:49 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/qemu-tput
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/qemu-tput

Chen Qi (1):
runqemu: do not check return code of tput

 scripts/runqemu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 runqemu: do not check return code of tput

The subprocess.run was replaced by subprocess.check_call because of compatibility support down to python 3.4. But we really don't care about whether that command succeeds. Some user reports that in some tmux environment, this command fails and gives some unpleasant traceback output. So we use 'call' instead of 'check_call' to avoid such problem.

---
 scripts/runqemu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
index c4a0ca8..d3239ee 100755
@@ -1318,7 +1318,7 @@ def main():
             logger.info("SIGTERM received")
             os.kill(config.qemupid, signal.SIGTERM)
             config.cleanup()
-            subprocess.check_call(["tput", "smam"])
+            subprocess.call(["tput", "smam"])
         signal.signal(signal.SIGTERM, sigterm_handler)
 
         config.check_args()
@@ -1340,7 +1340,7 @@ def main():
         return 1
     finally:
         config.cleanup()
-        subprocess.check_call(["tput", "smam"])
+        subprocess.call(["tput", "smam"])
 
 if __name__ == "__main__":
     sys.exit(main())
Signature · 1 line
1.9.1
author
#2 lore raw

ping

Quoted 34 lines · Chen Qi

The subprocess.run was replaced by subprocess.check_call because of compatibility support down to python 3.4. But we really don't care about whether that command succeeds. Some user reports that in some tmux environment, this command fails and gives some unpleasant traceback output. So we use 'call' instead of 'check_call' to avoid such problem.

---
  scripts/runqemu | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
index c4a0ca8..d3239ee 100755
@@ -1318,7 +1318,7 @@ def main():
              logger.info("SIGTERM received")
              os.kill(config.qemupid, signal.SIGTERM)
              config.cleanup()
-            subprocess.check_call(["tput", "smam"])
+            subprocess.call(["tput", "smam"])
          signal.signal(signal.SIGTERM, sigterm_handler)
 
          config.check_args()
@@ -1340,7 +1340,7 @@ def main():
          return 1
      finally:
          config.cleanup()
-        subprocess.check_call(["tput", "smam"])
+        subprocess.call(["tput", "smam"])
 
  if __name__ == "__main__":
      sys.exit(main())
#3 lore raw
In reply to Chen Qi
Quoted 26 lines · Chen Qi

The subprocess.run was replaced by subprocess.check_call because of compatibility support down to python 3.4. But we really don't care about whether that command succeeds. Some user reports that in some tmux environment, this command fails and gives some unpleasant traceback output. So we use 'call' instead of 'check_call' to avoid such problem.

---
 scripts/runqemu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +1 -1
index c4a0ca8..d3239ee 100755
@@ -1318,7 +1318,7 @@ def main():
             logger.info("SIGTERM received")
             os.kill(config.qemupid, signal.SIGTERM)
             config.cleanup()
-            subprocess.check_call(["tput", "smam"])
+            subprocess.call(["tput", "smam"])
         signal.signal(signal.SIGTERM, sigterm_handler)
 
         config.check_args()

scripts/runqemu def main(): · line 1343

Quoted 5 lines
scripts/runqemu +1 -1
@@ -1340,7 +1340,7 @@ def main():
         return 1
     finally:
         config.cleanup()
-        subprocess.check_call(["tput", "smam"])
+        subprocess.call(["tput", "smam"])

Can you send a v2 with a comment saying we're ignoring errors deliberately please? Otherwise someone will just "fix" this again.

Cheers,

Richard