equal
deleted
inserted
replaced
12 from .i18n import _ |
12 from .i18n import _ |
13 from .pycompat import getattr |
13 from .pycompat import getattr |
14 from . import ( |
14 from . import ( |
15 encoding, |
15 encoding, |
16 error, |
16 error, |
17 pycompat, |
|
18 util, |
17 util, |
19 ) |
18 ) |
20 |
19 |
21 |
20 |
22 class config(object): |
21 class config(object): |
108 |
107 |
109 def sections(self): |
108 def sections(self): |
110 return sorted(self._data.keys()) |
109 return sorted(self._data.keys()) |
111 |
110 |
112 def items(self, section): |
111 def items(self, section): |
113 items = pycompat.iteritems(self._data.get(section, {})) |
112 items = self._data.get(section, {}).items() |
114 return [(k, v[0]) for (k, v) in items] |
113 return [(k, v[0]) for (k, v) in items] |
115 |
114 |
116 def set(self, section, item, value, source=b""): |
115 def set(self, section, item, value, source=b""): |
117 assert not isinstance( |
116 assert not isinstance( |
118 section, str |
117 section, str |