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

Side by Side Diff: chrome/common/extensions/docs/server2/fetch.py

Issue 10387225: Die build.py, Die: Part 1 (BranchUtility and SubversionFetcher) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit tests Created 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from google.appengine.api import urlfetch
6
7 class FetchException(Exception):
8 """Thrown when status code is not 200.
9 """
10 def __init__(self, url):
11 Exception.__init__(self, 'Fetch exception from ' + url)
12
13 def Fetch(url):
14 result = urlfetch.fetch(
15 url="http://omahaproxy.appspot.com/json",
Aaron Boodman 2012/05/22 22:45:02 I don't think this or the stuff in google/appengin
cduvall 2012/05/24 00:15:40 Much better, good idea.
16 method=urlfetch.GET)
17
18 if result.status_code != 200:
19 raise FetchException(url)
20 return result.content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698