diff --git a/extras/csrf_migration_helper.py b/extras/csrf_migration_helper.py
index bc352a1..2934ca8 100644
a
|
b
|
class Template(object):
|
176 | 176 | return self._content |
177 | 177 | except AttributeError: |
178 | 178 | fd = open(self.absolute_filename) |
179 | | content = fd.read().decode(TEMPLATE_ENCODING) |
| 179 | try: |
| 180 | content = fd.read().decode(TEMPLATE_ENCODING) |
| 181 | except UnicodeDecodeError, e: |
| 182 | message = '%s in %s' % ( |
| 183 | e[4], self.absolute_filename.encode('UTF-8', 'ignore')) |
| 184 | raise UnicodeDecodeError(*(e.args[:4] + (message,))) |
180 | 185 | fd.close() |
181 | 186 | self._content = content |
182 | 187 | return content |