Fix globbing to find remote python
From: truty@google.com
There is a problem we observe with chromeos that a logfile.monitor error
occurs in our jobs. The problem is illustrated below. When
list_remote_pythons() is invoked in logfile_monitor.py, it mistakenly grabs
/usr/bin/python-config-2.6 as it's interpreter. This patch seems a tiny bit
more careful in identifying the proper interpreter.
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4287 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/logfile_monitor.py b/server/hosts/logfile_monitor.py
index 84d1d55..1608a6b 100644
--- a/server/hosts/logfile_monitor.py
+++ b/server/hosts/logfile_monitor.py
@@ -37,7 +37,7 @@
def list_remote_pythons(host):
"""List out installed pythons on host."""
- result = host.run('ls /usr/bin/python*')
+ result = host.run('ls /usr/bin/python[0-9]*')
return result.stdout.splitlines()