diff options
author | Caroline Tice <cmtice@google.com> | 2016-01-13 09:48:29 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-22 19:30:55 +0000 |
commit | 88272d479f2761cc1906fea564c73033f77a6270 (patch) | |
tree | 4da9c114d64522f59494a908cf9a85b09c994d32 /command_executer_timeout_test.py | |
parent | 439f2b77c86987362f53bd4f6e39896aa6d77f66 (diff) | |
download | toolchain-utils-88272d479f2761cc1906fea564c73033f77a6270.tar.gz |
Fix cros lint errors.
Also move deprecated scripts to the 'deprecated' directory.
BUG=chromiumos:570464
TEST=tested scripts to make sure they still work.
Change-Id: I3442a86d898104591233a0849ea0bafb52ecf1f7
Reviewed-on: https://chrome-internal-review.googlesource.com/244221
Commit-Ready: Caroline Tice <cmtice@google.com>
Tested-by: Caroline Tice <cmtice@google.com>
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'command_executer_timeout_test.py')
-rwxr-xr-x | command_executer_timeout_test.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/command_executer_timeout_test.py b/command_executer_timeout_test.py index c7c94cbf..ba0207ef 100755 --- a/command_executer_timeout_test.py +++ b/command_executer_timeout_test.py @@ -1,26 +1,27 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Copyright 2010 Google Inc. All Rights Reserved. +"""Timeout test for command_executer.""" + +from __future__ import print_function __author__ = 'asharif@google.com (Ahmad Sharif)' -import optparse -import os -import re +import argparse import sys -from utils import command_executer +from cros_utils import command_executer def Usage(parser, message): - print 'ERROR: ' + message + print('ERROR: %s' % message) parser.print_help() sys.exit(0) def Main(argv): - parser = optparse.OptionParser() - options = parser.parse_args(argv)[0] + parser = argparse.ArgumentParser() + _ = parser.parse_args(argv) command = 'sleep 1000' ce = command_executer.GetCommandExecuter() @@ -29,4 +30,4 @@ def Main(argv): if __name__ == '__main__': - Main(sys.argv) + Main(sys.argv[1:]) |