Apparently in Py2.4 the Exception class doesn't have 'message'
attribute.
| ... | ... |
@@ -42,7 +42,7 @@ try: |
| 42 | 42 |
def mime_magic(file): |
| 43 | 43 |
return magic_.file(file) |
| 44 | 44 |
except ImportError, e: |
| 45 |
- if e.message.find("magic") >= 0:
|
|
| 45 |
+ if str(e).find("magic") >= 0:
|
|
| 46 | 46 |
magic_message = "Module python-magic is not available." |
| 47 | 47 |
else: |
| 48 | 48 |
magic_message = "Module python-magic can't be used (%s)." % e.message |