Skip to content
This repository has been archived by the owner on Nov 4, 2018. It is now read-only.

Commit

Permalink
Improved compatibility with Python 2.4
Browse files Browse the repository at this point in the history
Apparently in Py2.4 the Exception class doesn't have 'message'
attribute.
  • Loading branch information
mludvig committed Jan 12, 2012
1 parent 1bc3cd0 commit 74e7854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion S3/S3.py
Expand Up @@ -42,7 +42,7 @@ def mime_magic(file):
def mime_magic(file):
return magic_.file(file)
except ImportError, e:
if e.message.find("magic") >= 0:
if str(e).find("magic") >= 0:
magic_message = "Module python-magic is not available."
else:
magic_message = "Module python-magic can't be used (%s)." % e.message
Expand Down

0 comments on commit 74e7854

Please sign in to comment.