diff --git a/trac/config.py b/trac/config.py
index cd43e8887..b8ad92e0e 100644
a
|
b
|
class ChoiceOption(Option):
|
819 | 819 | """ |
820 | 820 | |
821 | 821 | def __init__(self, section, name, choices, doc='', doc_domain='tracini', |
822 | | doc_args=None): |
| 822 | doc_args=None, case_sensitive=True): |
823 | 823 | Option.__init__(self, section, name, to_unicode(choices[0]), doc, |
824 | 824 | doc_domain, doc_args) |
825 | 825 | self.choices = set(to_unicode(c).strip() for c in choices) |
| 826 | self.case_sensitive = case_sensitive |
826 | 827 | |
827 | 828 | def accessor(self, section, name, default): |
828 | 829 | value = section.get(name, default) |
829 | | if value not in self.choices: |
| 830 | choices = self.choices |
| 831 | if not self.case_sensitive: |
| 832 | value = value.lower() |
| 833 | choices = map(unicode.lower, choices) |
| 834 | if value not in choices: |
830 | 835 | raise ConfigurationError( |
831 | 836 | _('[%(section)s] %(entry)s: expected one of ' |
832 | 837 | '(%(choices)s), got %(value)s', |
diff --git a/trac/env.py b/trac/env.py
index 0ecbb5b42..19c2b5f3d 100644
a
|
b
|
class Environment(Component, ComponentManager):
|
250 | 250 | """Level of verbosity in log. |
251 | 251 | |
252 | 252 | Should be one of (`CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`). |
253 | | """) |
| 253 | """, case_sensitive=False) |
254 | 254 | |
255 | 255 | log_format = Option('logging', 'log_format', None, |
256 | 256 | """Custom logging format. |