Chromium Code Reviews| Index: presubmit_support.py |
| diff --git a/presubmit_support.py b/presubmit_support.py |
| index f39d8212e9729e71f215e8f3e5fb68aad10f9e73..6b69145db4ab39b61326ee71085e0a73f45f76d7 100755 |
| --- a/presubmit_support.py |
| +++ b/presubmit_support.py |
| @@ -1559,9 +1559,14 @@ def Main(argv): |
| if options.rietveld_email and options.rietveld_email_file: |
| parser.error("Only one of --rietveld_email or --rietveld_email_file " |
| "can be passed to this program.") |
| - if options.rietveld_private_key_file and options.rietveld_password: |
| - parser.error("Only one of --rietveld_private_key_file or " |
| - "--rietveld_password can be passed to this program.") |
| + if options.rietveld_private_key_file: |
| + if options.rietveld_password: |
| + parser.error("Only one of --rietveld_private_key_file or " |
| + "--rietveld_password can be passed to this program.") |
| + elif not options.rietveld_password: |
|
nodir
2014/04/15 03:16:47
I would be more explicit:
options.rietveld_passw
|
| + # Default to empty password if neither e-mail nor password is supplied |
| + options.rietveld_password = '' |
| + |
| if options.rietveld_email_file: |
| with open(options.rietveld_email_file, "rb") as f: |
| options.rietveld_email = f.read().strip() |