Conditions | 2 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from pysmartprice.smartparser import ( |
||
15 | def __getattr__(self, attr): |
||
16 | if attr not in SMARTPRICE_ATTRS: |
||
17 | msg = '{} object has no attribute {}' |
||
18 | raise AttributeError(msg.format(self.__class__.__name__, attr)) |
||
19 | |||
20 | setattr(self, attr, self.parser_results(SMARTPRICE_ATTRS[attr])) |
||
21 | return getattr(self, attr) |
||
22 | |||
38 |