Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Updating handler ofr py2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Sep 4, 2012
1 parent 7535b6e commit afc8d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion echo.py
Expand Up @@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
# #


__author__ = ('ericbidelman@html5rocks.com (Eric Bidelman)') __author__ = 'ericbidelman@html5rocks.com (Eric Bidelman)'




import webapp2 import webapp2
Expand Down
4 changes: 2 additions & 2 deletions main.py
Expand Up @@ -88,7 +88,7 @@ def is_awesome_mobile_device(self):
return browser.find('Android') != -1 or browser.find('iPhone') != -1 return browser.find('Android') != -1 or browser.find('iPhone') != -1


def get_toc(self, path): def get_toc(self, path):
# Only have TOC on tutorial pages. # Only have TOC on tutorial pages. Don't do work for others.
if not (re.search('/tutorials', path) or re.search('/mobile', path)): if not (re.search('/tutorials', path) or re.search('/mobile', path)):
return '' return ''


Expand Down Expand Up @@ -936,5 +936,5 @@ def handle_500(request, response, exception):


app = webapp2.WSGIApplication(routes, debug=settings.DEBUG) app = webapp2.WSGIApplication(routes, debug=settings.DEBUG)
app.error_handlers[404] = handle_404 app.error_handlers[404] = handle_404
if settings.PROD and settings.DEBUG: if settings.PROD and not settings.DEBUG:
app.error_handlers[500] = handle_500 app.error_handlers[500] = handle_500

0 comments on commit afc8d13

Please sign in to comment.