Fixed reauthentication issue
Renewal of OAuth2 credentials did not work on appengine because it
replies with 302 instead of 401 when authentication fails. Configured
it to attempt credentials renewal on a 302.
Of course this will prevent any 302 from working normally, but it works
with Rietveld since it does not use 302.
BUG=319446
Review URL: https://codereview.chromium.org/238273011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264639 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/rietveld.py b/rietveld.py
index e296181..97dae6d 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -30,6 +30,8 @@
import third_party.oauth2client.client as oa2client
from third_party import httplib2
+# Appengine replies with 302 when authentication fails (sigh.)
+oa2client.REFRESH_STATUS_CODES.append(302)
upload.LOGGER.setLevel(logging.WARNING) # pylint: disable=E1103