Total Complexity | 1 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 83.33% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | # coding: utf-8 |
||
46 | 1 | @zope.interface.implementer(INISerializable) |
|
47 | 1 | class Events(Model): |
|
48 | 1 | chat_level = IntType( |
|
49 | min_value=0, |
||
50 | max_value=3, |
||
51 | default=0, |
||
52 | required=True, |
||
53 | ) |
||
54 | 1 | logging = ModelType( |
|
55 | model_spec=Logging, |
||
56 | required=True, |
||
57 | ) |
||
58 | |||
59 | 1 | @classmethod |
|
60 | def from_ini(cls, ini): |
||
61 | return cls({ |
||
62 | 'chat_level': ini.getint( |
||
63 | 'chat', 'autoLogDetail', |
||
64 | fallback=cls.chat_level.default, |
||
65 | ), |
||
66 | 'logging': Logging.from_ini(ini), |
||
67 | }) |
||
68 |