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

Unified Diff: scripts/master/try_job_rietveld.py

Issue 10804037: Fix up try job reitveld patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build/
Patch Set: Created 8 years, 5 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: scripts/master/try_job_rietveld.py
===================================================================
--- scripts/master/try_job_rietveld.py (revision 147528)
+++ scripts/master/try_job_rietveld.py (working copy)
@@ -4,6 +4,7 @@
import hashlib
import json
+import os
import time
import urllib
import urlparse
@@ -62,19 +63,20 @@
"""Downloads list of valid users.
Returns:
- A frozenset of string containing the email addresses of users allowed to
+ A string of lines containing the email addresses of users allowed to
send jobs from Rietveld.
"""
- try:
- pwd = open(self._PWD_FILE).readline().strip()
- except IOError:
- return frozenset([])
+ if not os.path.isfile(self._PWD_FILE):
+ log.msg("No password file %s; no valid users.")
+ return ""
+ pwd = open(self._PWD_FILE).readline().strip()
now_string = str(int(time.time()))
params = {
'md5': hashlib.md5(pwd + now_string).hexdigest(),
'time': now_string
}
+
M-A Ruel 2012/07/19 22:47:23 This new line is not 100% necessary. :)
return client.getPage('https://chromium-access.appspot.com/auto/users',
agent='buildbot',
method='POST',
« 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