Mercurial > hg > martINI
comparison martini/config.py @ 19:81e0743dbe53
py3
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Tue, 24 Nov 2020 14:48:42 -0800 |
| parents | a42a02bb46ed |
| children | 93c198d9bf84 |
comparison
equal
deleted
inserted
replaced
| 18:c570adf77a48 | 19:81e0743dbe53 |
|---|---|
| 66 return an object with __getitem__ defined appropriately | 66 return an object with __getitem__ defined appropriately |
| 67 to allow referencing like self['foo']['bar'] | 67 to allow referencing like self['foo']['bar'] |
| 68 """ | 68 """ |
| 69 return OrderedDict(self.items(section)) | 69 return OrderedDict(self.items(section)) |
| 70 | 70 |
| 71 def get(self, section, option, default=None, raw=False, vars=None): | 71 def get(self, section, option, default=None, **kw) |
| 72 try: | 72 try: |
| 73 value = ConfigParser.get(self, section, option, raw, vars) | 73 value = ConfigParser.get(self, section, option, **kw) |
| 74 except NoOptionError: | 74 except NoOptionError: |
| 75 return default | 75 return default |
| 76 return value | 76 return value |
| 77 | 77 |
| 78 def set(self, section, option, value): | 78 def set(self, section, option, value): |
