Commits

Georg Brandl committed 74e86e5

Mode "Ub" does not exist.

Comments (0)

Files changed (2)

             try:
                 try:
                     os.chdir(dirname)
-                    f = open(config_file, 'Ub')
+                    f = open(config_file, 'rb')
                     try:
                         code = compile(f.read(), config_file, 'exec')
                     finally:

sphinx/directives/code.py

         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()