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

Side by Side Diff: appengine/components/components/decorators.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 6 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
1 # Copyright 2014 The LUCI Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Handlers decorators.""" 5 """Handlers decorators."""
6 6
7 import functools 7 import functools
8 import logging 8 import logging
9 9
10 10
11 def silence(*exceptions): 11 def silence(*exceptions):
12 """Eats the exceptions listed and log a warning instead of an error. 12 """Eats the exceptions listed and log a warning instead of an error.
13 13
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 self.response.headers['Content-Type'] = 'text/plain; charset=utf-8' 50 self.response.headers['Content-Type'] = 'text/plain; charset=utf-8'
51 msg = 'Only internal task %s can do this' % task_name 51 msg = 'Only internal task %s can do this' % task_name
52 if actual_name: 52 if actual_name:
53 msg += '; got %s' % actual_name 53 msg += '; got %s' % actual_name
54 logging.error(msg) 54 logging.error(msg)
55 self.abort(403, msg) 55 self.abort(403, msg)
56 return 56 return
57 return f(self, *args, **kwargs) 57 return f(self, *args, **kwargs)
58 return hook 58 return hook
59 return decorator 59 return decorator
OLDNEW
« no previous file with comments | « appengine/components/components/datastore_utils/utils.py ('k') | appengine/components/components/ereporter2/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698