equal
deleted
inserted
replaced
122 |
122 |
123 """ |
123 """ |
124 sect_opt = section_option.lower().split('.') |
124 sect_opt = section_option.lower().split('.') |
125 # TODO: cache it |
125 # TODO: cache it |
126 if len(sect_opt) != 2: # do we need a regexp to check the format? |
126 if len(sect_opt) != 2: # do we need a regexp to check the format? |
127 raise BadOptionError( |
127 raise BadOptionError(_(u"Bad format: '%s' - expected: " |
128 _(u"Bad format: '%s' - expected: section.option") % |
128 u"section.option") % |
129 get_unicode(section_option)) |
129 get_unicode(section_option)) |
130 if not sect_opt[0] in self._cfg: |
130 if not sect_opt[0] in self._cfg: |
131 raise NoSectionError(sect_opt[0]) |
131 raise NoSectionError(sect_opt[0]) |
132 if not sect_opt[1] in self._cfg[sect_opt[0]]: |
132 if not sect_opt[1] in self._cfg[sect_opt[0]]: |
133 raise NoOptionError(sect_opt[1], sect_opt[0]) |
133 raise NoOptionError(sect_opt[1], sect_opt[0]) |