Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3705)

Unified Diff: chrome/common/extensions/docs/server2/appengine_wrappers.py

Issue 297963004: Docserver: Update app version parsing since AppEngine started including / (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ab91e5b543bab23372c2dac76a65ab71730962ae 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:

Powered by Google App Engine
This is Rietveld 408576698