Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 30574:bcb858396233
py3: avoid use of basestring
"In this case, result is a source variable of a list to be returned, it
shouldn't be unicode. Hence we can use bytes instead of basestring here." -Yuya
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 30 Nov 2016 23:51:11 +0530 |
parents | d83ca854fa21 |
children | 201b44c8875c |
comparison
equal
deleted
inserted
replaced
30573:bb35fe8621f5 | 30574:bcb858396233 |
---|---|
533 return parts | 533 return parts |
534 | 534 |
535 result = self.config(section, name, untrusted=untrusted) | 535 result = self.config(section, name, untrusted=untrusted) |
536 if result is None: | 536 if result is None: |
537 result = default or [] | 537 result = default or [] |
538 if isinstance(result, basestring): | 538 if isinstance(result, bytes): |
539 result = _configlist(result.lstrip(' ,\n')) | 539 result = _configlist(result.lstrip(' ,\n')) |
540 if result is None: | 540 if result is None: |
541 result = default or [] | 541 result = default or [] |
542 return result | 542 return result |
543 | 543 |