In Python 2.6+, you can handle the following exceptions:
try: # stuff except Exception as e: return 'exception %s' % type(e)
What is equivalent in 2.5?
Like this:
try: # stuff except Exception, e: return 'exception %s' % type(e)