summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2011-08-19 01:48:54 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2011-08-19 01:48:54 +0000
commit4d09a44add7f55724d63fb9339a07e467d7487d2 (patch)
tree93a5e05575971f061e1209dc7d6c8cb03a4e1b21
parent909c1828e429d0bb21cc62800e0c183efc0459cc (diff)
downloadpyserial-4d09a44add7f55724d63fb9339a07e467d7487d2.tar.gz
also redirect stderr when calling lsusb
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@415 f19166aa-fa4f-0410-85c2-fa1106f25c8a
-rw-r--r--serial/tools/list_ports_posix.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/serial/tools/list_ports_posix.py b/serial/tools/list_ports_posix.py
index ebfa4ef..8d2357e 100644
--- a/serial/tools/list_ports_posix.py
+++ b/serial/tools/list_ports_posix.py
@@ -8,14 +8,14 @@ try:
except ImportError:
def popen(argv):
try:
- si, so = os.popen2(' '.join(argv))
+ si, so = os.popen4(' '.join(argv))
return so.read().strip()
except:
raise IOError('lsusb failed')
else:
def popen(argv):
try:
- return subprocess.check_output(argv).strip()
+ return subprocess.check_output(argv, stderr=subprocess.STDOUT).strip()
except:
raise IOError('lsusb failed')