From 26e51630e4005356314bbaee2c0a041eff71d614 Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Thu, 7 Nov 2019 17:46:58 +0100 Subject: [PATCH] Moved subprocess call --- app/fastnao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/fastnao.py b/app/fastnao.py index c5d8a0b..286c0d3 100644 --- a/app/fastnao.py +++ b/app/fastnao.py @@ -778,7 +778,6 @@ def fastReboot(self): self.tts.say(lang.Reboot) self.motion.rest() self.unload(False) - subprocess.call(["/usr/bin/sudo", "/etc/init.d/naoqi", "restart"]) global shutdown shutdown = True @@ -839,6 +838,7 @@ def main(): while True: time.sleep(1) if(shutdown): + subprocess.call(["/usr/bin/sudo", "/etc/init.d/naoqi", "restart"]) sys.exit(0) except KeyboardInterrupt: print "Interrupted by user, shutting down..."