Fix Sphinx error when using Python 2

develop
lethosor 2015-10-02 21:34:08 -04:00
parent 3b8d5a6a95
commit 60bc2619a1
1 changed files with 3 additions and 2 deletions

@ -14,9 +14,10 @@
# serve to show the default. # serve to show the default.
import fnmatch import fnmatch
import sys import io
import os import os
import shlex import shlex
import sys
from os import listdir from os import listdir
from os.path import isfile, join, isdir from os.path import isfile, join, isdir
@ -33,7 +34,7 @@ def makeIncludeAll(directory, extension):
for f in files: for f in files:
#TODO: check if the file contains the BEGIN_DOCS string #TODO: check if the file contains the BEGIN_DOCS string
#print(join(directory,f)) #print(join(directory,f))
fstream = open(join(directory,f), 'r', encoding='utf8') fstream = io.open(join(directory,f), 'r', encoding='utf8')
data = fstream.read().replace('\n','') data = fstream.read().replace('\n','')
fstream.close() fstream.close()
if 'BEGIN_DOCS' in data: if 'BEGIN_DOCS' in data: