Index: testing/xvfb.py |
diff --git a/testing/xvfb.py b/testing/xvfb.py |
index a5620e7cde4072d7bd8b5f6bef54b27af767d9e1..af311e93fc6d6b753894841ad7893717cd825d62 100755 |
--- a/testing/xvfb.py |
+++ b/testing/xvfb.py |
@@ -6,6 +6,7 @@ |
"""Runs tests with Xvfb and Openbox on Linux and normally on other platforms.""" |
import os |
+import os.path |
import platform |
import signal |
import subprocess |
@@ -80,10 +81,15 @@ def run_executable(cmd, env): |
def main(): |
+ USAGE = 'Usage: xvfb.py [command args...]' |
if len(sys.argv) < 2: |
- print >> sys.stderr, ( |
- 'Usage: xvfb.py [command args...]') |
+ print >> sys.stderr, USAGE |
return 2 |
+ if os.path.isdir(sys.argv[1]): |
Tom Anderson
2017/03/14 22:43:43
nit: add a comment explaining why we have this cas
carlosk
2017/03/14 23:47:23
Done.
|
+ print >> sys.stderr, ( |
+ 'Invalid command: it\'s a directory') |
+ print >> sys.stderr, USAGE |
+ return 3 |
return run_executable(sys.argv[1:], os.environ.copy()) |