tjcsl / ion

TJ Intranet 3
https://ion.tjhsst.edu
GNU General Public License v2.0
99 stars 91 forks source link

Use cStringIO in Python 2 #76

Closed ethanal closed 9 years ago

ethanal commented 9 years ago

https://github.com/tjcsl/ion/blob/7fafddfd90dce1681d0d4c7f06a45ae62955125e/intranet/apps/eighth/views/attendance.py#L5

pefoley2 commented 9 years ago

from six.moves import cStringIO should do it.

ethanal commented 9 years ago

It should be BytesIO in python 3 though so catching the ImportError is probably the only way

pefoley2 commented 9 years ago

point.

pefoley2 commented 9 years ago

That should do it, feel free to cherry-pick to master.