Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 11309:ef7636efeb01
ui: handle leading newlines/spaces/commas in configlist
Thanks to Greg Ward for spotting the problem introduced in 0a548640e012
and for supplying the test case.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 08 Jun 2010 21:09:41 +0200 |
parents | e1dde7363601 |
children | fcd06ecd4cb7 |
comparison
equal
deleted
inserted
replaced
11308:16277f8aca1a | 11309:ef7636efeb01 |
---|---|
226 | 226 |
227 result = self.config(section, name, untrusted=untrusted) | 227 result = self.config(section, name, untrusted=untrusted) |
228 if result is None: | 228 if result is None: |
229 result = default or [] | 229 result = default or [] |
230 if isinstance(result, basestring): | 230 if isinstance(result, basestring): |
231 result = _configlist(result) | 231 result = _configlist(result.lstrip(' ,\n')) |
232 if result is None: | 232 if result is None: |
233 result = default or [] | 233 result = default or [] |
234 return result | 234 return result |
235 | 235 |
236 def has_section(self, section, untrusted=False): | 236 def has_section(self, section, untrusted=False): |