Commit b1311715 by heffnercj

Updated BlockFile for better compatability with python2.6

parent 38bb8a57
......@@ -121,6 +121,9 @@ class BlockFile(io.FileIO):
Returns None.
'''
self.total_read = 0
# Python 2.6 doesn't like modes like 'rb' or 'wb'
self.mode = mode.replace('b', '')
try:
self.size = file_size(fname)
......@@ -137,7 +140,7 @@ class BlockFile(io.FileIO):
else:
self.length = self.size
io.FileIO.__init__(self, fname, mode)
io.FileIO.__init__(self, fname, self.mode)
# Work around for python 2.6 where FileIO._name is not defined
try:
......
......@@ -23,6 +23,7 @@ function redhat
function darwin
{
# TODO: py-magic is OLD. Download and build from source?
sudo port install git-core arj p7zip py-magic py-matplotlib
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment