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

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

Issue 10831269: Extensions Docs Server: BranchUtility not fetching branch numbers correctly (fixed) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_url_fetcher.py
diff --git a/chrome/common/extensions/docs/server2/appengine_url_fetcher.py b/chrome/common/extensions/docs/server2/appengine_url_fetcher.py
index 3695fb4e81dae5f26366bce6a493c933ad856073..fa85dbebc0d7b6e5394b12b95b8e07c5073eb362 100644
--- a/chrome/common/extensions/docs/server2/appengine_url_fetcher.py
+++ b/chrome/common/extensions/docs/server2/appengine_url_fetcher.py
@@ -23,11 +23,17 @@ class AppEngineUrlFetcher(object):
def Fetch(self, url):
"""Fetches a file synchronously.
"""
- return urlfetch.fetch(self._base_path + '/' + url)
+ if self._base_path is not None:
+ return urlfetch.fetch(self._base_path + '/' + url)
+ else:
+ return urlfetch.fetch(url)
def FetchAsync(self, url):
"""Fetches a file asynchronously, and returns a Future with the result.
"""
rpc = urlfetch.create_rpc()
- urlfetch.make_fetch_call(rpc, self._base_path + '/' + url)
+ if self._base_path is not None:
+ urlfetch.make_fetch_call(rpc, self._base_path + '/' + url)
+ else:
+ urlfetch.make_fetch_call(rpc, url)
return Future(delegate=_AsyncFetchDelegate(rpc))

Powered by Google App Engine
This is Rietveld 408576698