read media files in binary format

This commit is contained in:
Damien Elmes 2012-09-25 10:33:09 +09:00
parent 90a4ac2584
commit 76b356fe0d

View file

@ -283,7 +283,7 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
dir = self.src.media.dir()
path = os.path.join(dir, fname)
try:
return open(path).read()
return open(path, "rb").read()
except IOError, OSError:
return