Bug 764712 - Open files readonly when reading typelibs in xpt.py, r=khuey

This commit is contained in:
Michael Wu 2012-06-20 14:45:11 -04:00
parent c254bd48c2
commit fdda8f2a36

View File

@ -1067,7 +1067,7 @@ class Typelib(object):
expected_size = None
if isinstance(input_file, basestring):
filename = input_file
with open(input_file, "r+b") as f:
with open(input_file, "rb") as f:
st = os.fstat(f.fileno())
data = f.read(st.st_size)
expected_size = st.st_size