my_activity: Skip Rietveld cookie check if not found.

ChromiumOS only developers don't always have a Chromium checkout and
a Rietveld cookie file (~/.codereview_upload_cookies) with the auth
keys. This patch proceeds with the activity lookup from other
services such as Gerrit and GoB if there's no Rietveld cookie
present, displaying an error message when this happens.

BUG=chromium:316961
TEST=Remove ~/.codereview_upload_cookies and ran my_activity. ChromeOS activity listed.

Review URL: https://codereview.chromium.org/68763004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@234874 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/my_activity.py b/my_activity.py
index 09dc0fb..d8a093a 100755
--- a/my_activity.py
+++ b/my_activity.py
@@ -277,15 +277,17 @@
   # 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 = []