Show More
@@ -1,38 +1,38 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | # Copyright (C) 2012-2017 RhodeCode GmbH |
|
2 | # Copyright (C) 2012-2017 RhodeCode GmbH | |
3 | # |
|
3 | # | |
4 | # This program is free software: you can redistribute it and/or modify |
|
4 | # This program is free software: you can redistribute it and/or modify | |
5 | # it under the terms of the GNU Affero General Public License, version 3 |
|
5 | # it under the terms of the GNU Affero General Public License, version 3 | |
6 | # (only), as published by the Free Software Foundation. |
|
6 | # (only), as published by the Free Software Foundation. | |
7 | # |
|
7 | # | |
8 | # This program is distributed in the hope that it will be useful, |
|
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. |
|
11 | # GNU General Public License for more details. | |
12 | # |
|
12 | # | |
13 | # You should have received a copy of the GNU Affero General Public License |
|
13 | # You should have received a copy of the GNU Affero General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | # |
|
15 | # | |
16 | # This program is dual-licensed. If you wish to learn more about the |
|
16 | # This program is dual-licensed. If you wish to learn more about the | |
17 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
17 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
18 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
18 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
19 |
|
19 | |||
20 | import logging |
|
20 | import logging | |
21 | import collections |
|
21 | import collections | |
22 |
|
22 | |||
23 | log = logging.getLogger(__name__) |
|
23 | log = logging.getLogger(__name__) | |
24 |
|
24 | |||
25 |
|
25 | |||
26 | class IntegrationTypeRegistry(collections.OrderedDict): |
|
26 | class IntegrationTypeRegistry(collections.OrderedDict): | |
27 | """ |
|
27 | """ | |
28 | Registry Class to hold IntegrationTypes |
|
28 | Registry Class to hold IntegrationTypes | |
29 | """ |
|
29 | """ | |
30 | def register_integration_type(self, IntegrationType): |
|
30 | def register_integration_type(self, IntegrationType): | |
31 | key = IntegrationType.key |
|
31 | key = IntegrationType.key | |
32 | if key in self: |
|
32 | if key in self: | |
33 |
log. |
|
33 | log.debug( | |
34 | 'Overriding existing integration type %s (%s) with %s' % ( |
|
34 | 'Overriding existing integration type %s (%s) with %s' % ( | |
35 | self[key], key, IntegrationType)) |
|
35 | self[key], key, IntegrationType)) | |
36 |
|
36 | |||
37 | self[key] = IntegrationType |
|
37 | self[key] = IntegrationType | |
38 |
|
38 |
General Comments 0
You need to be logged in to leave comments.
Login now