Changed backoff to be exponential. This will help to reduce apply_issue flakiness.

BUG=373797
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277040 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/rietveld.py b/rietveld.py
index d78c017..f6ccaf9 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -409,7 +409,7 @@
         old_error_exit(msg)
       upload.ErrorExit = trap_http_500
 
-      maxtries = 5
+      maxtries = 40
       for retry in xrange(maxtries):
         try:
           logging.debug('%s' % request_path)
@@ -435,7 +435,7 @@
           if not 'timed out' in str(e):
             raise
         # If reaching this line, loop again. Uses a small backoff.
-        time.sleep(1+maxtries*2)
+        time.sleep(min(10, 1+retry*2))
     finally:
       upload.ErrorExit = old_error_exit