Chromium Code Reviews| 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', |