diff options
| author | Georg Brandl <georg@python.org> | 2010-07-28 19:35:35 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-07-28 19:35:35 +0200 |
| commit | 73e10b85af46fc7588d865db3ed4ba3a083be163 (patch) | |
| tree | c6549f0f2673c6fce8822bb2a03068f8450a3044 | |
| parent | c70d3921c4f0ace54bf198e44babc357011713ba (diff) | |
| download | sphinx-73e10b85af46fc7588d865db3ed4ba3a083be163.tar.gz | |
Mode "Ub" does not exist.
| -rw-r--r-- | sphinx/config.py | 2 | ||||
| -rw-r--r-- | sphinx/directives/code.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index 273bb97d..708da162 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -167,7 +167,7 @@ class Config(object): try: try: os.chdir(dirname) - f = open(config_file, 'Ub') + f = open(config_file, 'rb') try: code = compile(f.read(), config_file, 'exec') finally: diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 54d8edf1..1808cdab 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -119,7 +119,7 @@ class LiteralInclude(Directive): encoding = self.options.get('encoding', env.config.source_encoding) codec_info = codecs.lookup(encoding) try: - f = codecs.StreamReaderWriter(open(fn, 'Ub'), + f = codecs.StreamReaderWriter(open(fn, 'rb'), codec_info[2], codec_info[3], 'strict') lines = f.readlines() f.close() |
