| Total Complexity | 1 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 83.33% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | # coding: utf-8 |
||
| 11 | 1 | @zope.interface.implementer(INISerializable) |
|
| 12 | 1 | class About(Model): |
|
| 13 | 1 | name = StringType( |
|
| 14 | default="", |
||
| 15 | required=True, |
||
| 16 | ) |
||
| 17 | 1 | description = StringType( |
|
| 18 | default="", |
||
| 19 | required=True, |
||
| 20 | ) |
||
| 21 | |||
| 22 | 1 | @classmethod |
|
| 23 | def from_ini(cls, ini): |
||
| 24 | return cls({ |
||
| 25 | 'name': ini.get( |
||
| 26 | 'NET', 'serverName', |
||
| 27 | fallback=cls.name.default, |
||
| 28 | ), |
||
| 29 | 'description': ini.get( |
||
| 30 | 'NET', 'serverDescription', |
||
| 31 | fallback=cls.description.default, |
||
| 32 | ), |
||
| 34 |