Commits

Stefan Scherfke committed 604d667

Open all files in "r" mode.

  • Participants
  • Parent commits 35da8eb

Comments (0)

Files changed (2)

sphinxdoc/management/commands/updatedoc.py

                 relpath = os.path.relpath(filepath, path)[:-len(EXTENSION)]
 
                 # Some files have no title or body attribute
-                doc = json.load(open(filepath, 'rb'))
+                doc = json.load(open(filepath, 'r'))
                 if 'title' not in doc and 'indextitle' not in doc:
                     page_name = os.path.basename(relpath)
                     doc['title'] = SPECIAL_TITLES[page_name]

sphinxdoc/views.py

 
     try:
         env = json.load(open(os.path.join(project.path, BUILDDIR,
-                                          'globalcontext.json'), 'rb'))
+                                          'globalcontext.json'), 'r'))
     except IOError:
         # It is possible that file does not exist anymore (for example, because
         # make clean to prepare for running make again), we do not want to
 
         try:
             env = json.load(open(os.path.join(project.path, BUILDDIR,
-                                              'globalcontext.json'), 'rb'))
+                                              'globalcontext.json'), 'r'))
         except IOError:
             # It is possible that file does not exist anymore (for example,
             # because make clean to prepare for running make again), we do not
 
 class OverviewList(ListView):
     """Listing of all projects available.
-    
+
     Extends :class:`django.views.generic.list.ListView`.
 
     If the user is not authenticated, then projects defined in