Bug 1253110 - Implement GeneratedFile.read(); r?glandium
This can get merged with the previous commit before landing.
MozReview-Commit-ID: 3PqRejsjpkJ
--- a/python/mozbuild/mozpack/files.py
+++ b/python/mozbuild/mozpack/files.py
@@ -486,16 +486,19 @@ class GeneratedFile(BaseFile):
File class for content with no previous existence on the filesystem.
'''
def __init__(self, content):
self.content = content
def open(self):
return BytesIO(self.content)
+ def read(self):
+ return self.content
+
class DeflatedFile(BaseFile):
'''
File class for members of a jar archive. DeflatedFile.copy() effectively
extracts the file from the jar archive.
'''
def __init__(self, file):
from mozpack.mozjar import JarFileReader