Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: presubmit_support.py

Issue 238603002: Added implicit empty password to 'presubmit_support.py' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Updated logic to completely mirror original Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index f39d8212e9729e71f215e8f3e5fb68aad10f9e73..5569485959673f6614be1deb07614a7f8946b98f 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -1562,6 +1562,7 @@ def Main(argv):
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_email_file:
with open(options.rietveld_email_file, "rb") as f:
options.rietveld_email = f.read().strip()
@@ -1574,19 +1575,16 @@ def Main(argv):
rietveld_obj = None
if options.rietveld_url:
# The empty password is permitted: '' is not None.
- if options.rietveld_password is not None:
- rietveld_obj = rietveld.CachingRietveld(
- options.rietveld_url,
- options.rietveld_email,
- options.rietveld_password)
- elif options.rietveld_private_key_file:
+ if options.rietveld_private_key_file:
rietveld_obj = rietveld.JwtOAuth2Rietveld(
options.rietveld_url,
options.rietveld_email,
options.rietveld_private_key_file)
else:
- parser.error("No password or secret key has been provided for "
- "Rietveld. Unable to connect.")
+ rietveld_obj = rietveld.CachingRietveld(
+ options.rietveld_url,
+ options.rietveld_email,
+ options.rietveld_password)
if options.rietveld_fetch:
assert options.issue
props = rietveld_obj.get_issue_properties(options.issue, False)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698