1 |
commit: 322b86611f1bb05aa20f30c3576faf7e4dfd7ae6 |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 2 23:47:39 2015 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 2 23:47:44 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=322b8661 |
7 |
|
8 |
laymanator/__init__.py: Modifies method in which config_class is set |
9 |
|
10 |
Also removes unnecessary debug code that will not be used in production |
11 |
|
12 |
--- |
13 |
layman/laymanator/__init__.py | 17 ++++------------- |
14 |
1 file changed, 4 insertions(+), 13 deletions(-) |
15 |
|
16 |
diff --git a/layman/laymanator/__init__.py b/layman/laymanator/__init__.py |
17 |
index 3d37fb9..62540ba 100644 |
18 |
--- a/layman/laymanator/__init__.py |
19 |
+++ b/layman/laymanator/__init__.py |
20 |
@@ -10,21 +10,12 @@ import os |
21 |
from portage.sync.config_checks import CheckSyncConfig |
22 |
|
23 |
|
24 |
-DEFAULT_CLASS = 'Layman' |
25 |
-AVAILABLE_CLASSES = [ 'Layman', 'PyLayman'] |
26 |
-options = {'1': 'Layman', '2': 'PyLayman'} |
27 |
- |
28 |
- |
29 |
-config_class = DEFAULT_CLASS |
30 |
try: |
31 |
- test_param = os.environ["TESTIT"] |
32 |
- if str(test_param) in options: |
33 |
- config_class = options[test_param] |
34 |
-except KeyError: |
35 |
- pass |
36 |
- |
37 |
+ import layman |
38 |
+ config_class = 'PyLayman' |
39 |
+except ImportError: |
40 |
+ config_class = 'Layman' |
41 |
|
42 |
-print("Using config class: " + config_class) |
43 |
|
44 |
module_spec = { |
45 |
'name': 'laymanator', |