conman: Fix WLANConfiguration logging.
Change check_call to check_output so that on failure, the
CalledProcessError's output field will be set.
Change-Id: Iaaa0623502e015f103206440476fb81b84f8ad00
diff --git a/conman/connection_manager.py b/conman/connection_manager.py
index 93d1bef..488178c 100755
--- a/conman/connection_manager.py
+++ b/conman/connection_manager.py
@@ -97,7 +97,7 @@
self.stop_client()
try:
- subprocess.check_call(self.command, stderr=subprocess.STDOUT)
+ subprocess.check_output(self.command, stderr=subprocess.STDOUT)
self.access_point_up = True
logging.debug('Started %s GHz AP', self.band)
except subprocess.CalledProcessError as e:
@@ -112,7 +112,7 @@
command += ['--interface_suffix', self.interface_suffix]
try:
- subprocess.check_call(command, stderr=subprocess.STDOUT)
+ subprocess.check_output(command, stderr=subprocess.STDOUT)
self.access_point_up = False
logging.debug('Stopped %s GHz AP', self.band)
except subprocess.CalledProcessError as e:
@@ -132,7 +132,7 @@
if self.passphrase:
env['WIFI_CLIENT_PSK'] = self.passphrase
try:
- subprocess.check_call(command, stderr=subprocess.STDOUT, env=env)
+ subprocess.check_output(command, stderr=subprocess.STDOUT, env=env)
self.client_up = True
logging.info('Started wifi client on %s GHz', self.band)
except subprocess.CalledProcessError as e:
@@ -146,7 +146,7 @@
self.wifi.detach_wpa_control()
try:
- subprocess.check_call(self.WIFI_STOPCLIENT + ['-b', self.band],
+ subprocess.check_output(self.WIFI_STOPCLIENT + ['-b', self.band],
stderr=subprocess.STDOUT)
self.client_up = False
logging.debug('Stopped wifi client on %s GHz', self.band)