annotate rhodecode/lib/middleware/errormator.py @ 3823:972ad33c5610 beta

removed duplicate code that set os.environ['RC_SCM_DATA'] this was done via __inject_extras anyway
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 08 May 2013 17:43:59 +0200
parents 9937afa7f093
children ffd45b185016
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2939
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 """
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 rhodecode.lib.middleware.errormator
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 middleware to handle errormator publishing of errors
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 :created_on: October 18, 2012
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 :author: marcink
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 :license: GPLv3, see COPYING for more details.
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 """
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 # This program is free software: you can redistribute it and/or modify
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 # it under the terms of the GNU General Public License as published by
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 # the Free Software Foundation, either version 3 of the License, or
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 # (at your option) any later version.
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 #
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 # This program is distributed in the hope that it will be useful,
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 # GNU General Public License for more details.
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 #
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 # You should have received a copy of the GNU General Public License
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 try:
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 from errormator_client import make_errormator_middleware
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 except ImportError:
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 Errormator = None
dbe3cfb81446 Added Errormator and Sentry support part of pull request #71
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 else:
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2939
diff changeset
31 Errormator = make_errormator_middleware