From 98246291578afa2b2ed1fe551dfa9a6a14bc6b5a Mon Sep 17 00:00:00 2001 From: "rogerta@chromium.org" Date: Fri, 21 Sep 2012 20:44:53 +0000 Subject: [PATCH] Allow the password to be specified through stdin. BUG=149941 Review URL: https://chromiumcodereview.appspot.com/10958049 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158068 0039d316-1c4b-4281-b951-d872f2087c98 --- apply_issue.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apply_issue.py b/apply_issue.py index 9c7bbbdf2b..9bc5d21231 100755 --- a/apply_issue.py +++ b/apply_issue.py @@ -35,7 +35,8 @@ def main(): help='Email address to access rietveld. If not specified, anonymous ' 'access will be used.') parser.add_option( - '-w', '--password', default=None, help='Password for email addressed.') + '-w', '--password', default=None, + help='Password for email addressed. Use - to read password from stdin.') parser.add_option( '-i', '--issue', type='int', help='Rietveld issue number') parser.add_option( @@ -63,6 +64,9 @@ def main(): if not options.server: parser.error('Require a valid server') + if options.password == '-': + options.password = sys.stdin.readline().strip() + obj = rietveld.Rietveld(options.server, options.email, options.password) try: properties = obj.get_issue_properties(options.issue, False)