Skip to content

Commit

Permalink
Moved subprocess call
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrimat committed Nov 7, 2019
1 parent c5749ba commit 26e5163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/fastnao.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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..."
Expand Down

0 comments on commit 26e5163

Please sign in to comment.