diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-24 00:28:22 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-24 00:28:22 +0000 |
commit | eb5b81b5f63240dfcf0bc27e861c6fc7fb1b24be (patch) | |
tree | bf376f8f4c635a6f9fbfeb5472acaf04e4bbfd42 /chrome/common/extensions/docs/server2/appengine_wrappers.py | |
parent | 023a90ac29763521d2f21b82bb8dd779742426f7 (diff) | |
download | chromium_src-eb5b81b5f63240dfcf0bc27e861c6fc7fb1b24be.zip chromium_src-eb5b81b5f63240dfcf0bc27e861c6fc7fb1b24be.tar.gz chromium_src-eb5b81b5f63240dfcf0bc27e861c6fc7fb1b24be.tar.bz2 |
Docserver: Update app version parsing since AppEngine started including '/'
separators.
R=rockot@chromium.org
Review URL: https://codereview.chromium.org/297963004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/server2/appengine_wrappers.py')
-rw-r--r-- | chrome/common/extensions/docs/server2/appengine_wrappers.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/chrome/common/extensions/docs/server2/appengine_wrappers.py b/chrome/common/extensions/docs/server2/appengine_wrappers.py index 46502c8..ab91e5b 100644 --- a/chrome/common/extensions/docs/server2/appengine_wrappers.py +++ b/chrome/common/extensions/docs/server2/appengine_wrappers.py @@ -2,19 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import os - -from app_yaml_helper import AppYamlHelper - -def GetAppVersion(): - 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, since there are 3 different types thrown by AppEngine and we might as well @@ -23,9 +10,11 @@ def IsDeadlineExceededError(error): ''' return type(error).__name__ == 'DeadlineExceededError' + def IsDownloadError(error): return type(error).__name__ == 'DownloadError' + # 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: |