Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 34215:0a2fd3bfc704
py3: convert function name to bytes in ui.configwith()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 17:47:21 +0900 |
parents | 0fa781320203 |
children | a254c669b475 |
comparison
equal
deleted
inserted
replaced
34214:5a1b41268b7c | 34215:0a2fd3bfc704 |
---|---|
593 return v # do not attempt to convert None | 593 return v # do not attempt to convert None |
594 try: | 594 try: |
595 return convert(v) | 595 return convert(v) |
596 except (ValueError, error.ParseError): | 596 except (ValueError, error.ParseError): |
597 if desc is None: | 597 if desc is None: |
598 desc = convert.__name__ | 598 desc = pycompat.sysbytes(convert.__name__) |
599 raise error.ConfigError(_("%s.%s is not a valid %s ('%s')") | 599 raise error.ConfigError(_("%s.%s is not a valid %s ('%s')") |
600 % (section, name, desc, v)) | 600 % (section, name, desc, v)) |
601 | 601 |
602 def configint(self, section, name, default=_unset, untrusted=False): | 602 def configint(self, section, name, default=_unset, untrusted=False): |
603 """parse a configuration element as an integer | 603 """parse a configuration element as an integer |