From 12fdbf4f9d66c2c334709eeaa647655ead061b0f Mon Sep 17 00:00:00 2001 From: Arron Atchison Date: Wed, 17 Aug 2016 12:53:49 -0500 Subject: [PATCH] Stating PATH in the same subprocess call --- mycroft/client/enclosure/enclosure.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mycroft/client/enclosure/enclosure.py b/mycroft/client/enclosure/enclosure.py index 57b36382de..85ac56f1a3 100644 --- a/mycroft/client/enclosure/enclosure.py +++ b/mycroft/client/enclosure/enclosure.py @@ -113,12 +113,12 @@ class EnclosureReader(Thread): subprocess.call('speaker-test -P 10 -l 0 -s 1', shell=True) if "unit.shutdown" in data: - subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin', shell=True) - subprocess.call('sudo poweroff', shell=True) + subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin' + ' && sudo poweroff', shell=True) if "unit.reboot" in data: - subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin', shell=True) - subprocess.call('sudo reboot', shell=True) + subprocess.call('PATH=/usr/bin:/bin:/usr/sbin:/sbin' + ' && sudo reboot', shell=True) if "unit.setwifi" in data: self.client.emit(Message("wifisetup.start"))