It is very unlikely that v is a tuple and 'hasattr(sys, 'exc_info')' is always true.
Attach a file by drag & drop or click to upload