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

Unified Diff: my_activity.py

Issue 68763004: my_activity: Skip Rietveld cookie check if not found. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years, 1 month 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: my_activity.py
diff --git a/my_activity.py b/my_activity.py
index 09dc0fb3ca7701ee47219dc37356d67c3e924d07..d8a093a81fcfa980a926d83c5c6405f51260562d 100755
--- a/my_activity.py
+++ b/my_activity.py
@@ -277,15 +277,17 @@ class MyActivity(object):
# authenticate to.
def check_cookies(self):
cookie_file = os.path.expanduser('~/.codereview_upload_cookies')
- cookie_jar = cookielib.MozillaCookieJar(cookie_file)
if not os.path.exists(cookie_file):
- exit(1)
-
- try:
- cookie_jar.load()
- print 'Found cookie file: %s' % cookie_file
- except (cookielib.LoadError, IOError):
- exit(1)
+ print 'No Rietveld cookie file found.'
+ cookie_jar = []
+ else:
+ cookie_jar = cookielib.MozillaCookieJar(cookie_file)
+ try:
+ cookie_jar.load()
+ print 'Found cookie file: %s' % cookie_file
+ except (cookielib.LoadError, IOError):
+ print 'Error loading Rietveld cookie file: %s' % cookie_file
+ cookie_jar = []
filtered_instances = []
« 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