Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/appengine_wrappers.py |
| diff --git a/chrome/common/extensions/docs/server2/appengine_wrappers.py b/chrome/common/extensions/docs/server2/appengine_wrappers.py |
| index 46502c81e0c6cde06cd3ff3a7f1992e68d451939..28ccc30bbe58544bb1b781b1dbd105c099b6898a 100644 |
| --- a/chrome/common/extensions/docs/server2/appengine_wrappers.py |
| +++ b/chrome/common/extensions/docs/server2/appengine_wrappers.py |
| @@ -2,18 +2,8 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -import os |
| +import re |
|
not at google - send to devlin
2014/05/23 19:14:29
will remove in next patchset.
|
| -from app_yaml_helper import AppYamlHelper |
| - |
| -def GetAppVersion(): |
|
not at google - send to devlin
2014/05/23 19:14:29
moved this into environment.py because it seemed m
|
| - if 'CURRENT_VERSION_ID' in os.environ: |
| - # The version ID looks like 2-0-25.36712548, we only want the 2-0-25. |
| - return os.environ['CURRENT_VERSION_ID'].split('.', 1)[0] |
| - # Not running on appengine, get it from the app.yaml file ourselves. |
| - app_yaml_path = os.path.join(os.path.split(__file__)[0], 'app.yaml') |
| - with open(app_yaml_path, 'r') as app_yaml: |
| - return AppYamlHelper.ExtractVersion(app_yaml.read()) |
| def IsDeadlineExceededError(error): |
| '''A general way of determining whether |error| is a DeadlineExceededError, |
| @@ -23,9 +13,15 @@ def IsDeadlineExceededError(error): |
| ''' |
| return type(error).__name__ == 'DeadlineExceededError' |
| + |
| def IsDownloadError(error): |
| return type(error).__name__ == 'DownloadError' |
| + |
| +def IsOverQuotaError(error): |
|
not at google - send to devlin
2014/05/23 19:14:29
will remove in next patchset
|
| + return type(error).__name__ == 'OverQuotaError' |
| + |
| + |
| # This will attempt to import the actual App Engine modules, and if it fails, |
| # they will be replaced with fake modules. This is useful during testing. |
| try: |