Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/extensions.py @ 38349:2c1d983872f6
py3: open extension source in binary mode to read docstring as bytes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 17 Jun 2018 17:59:12 +0900 |
parents | b39958d6b81b |
children | c6f82a18a63d |
comparison
equal
deleted
inserted
replaced
38348:b8f45fc27370 | 38349:2c1d983872f6 |
---|---|
603 return ''.join(result) | 603 return ''.join(result) |
604 | 604 |
605 def _disabledhelp(path): | 605 def _disabledhelp(path): |
606 '''retrieve help synopsis of a disabled extension (without importing)''' | 606 '''retrieve help synopsis of a disabled extension (without importing)''' |
607 try: | 607 try: |
608 file = open(path) | 608 file = open(path, 'rb') |
609 except IOError: | 609 except IOError: |
610 return | 610 return |
611 else: | 611 else: |
612 doc = _moduledoc(file) | 612 doc = _moduledoc(file) |
613 file.close() | 613 file.close() |