Hey I'm cleaning code that needs to version check if your python version is < than 2.7 from stuff in gluon that is not contrib (no point cleaning contrib as it will be updated with newer versions of the modules there that may or may not support earlier python versions)
In the process of doing that, I've come across these lines in restricted.py that as far as I can tell from our git have been there from the start:
if isinstance(evalue, BaseException):
for name in dir(evalue):
# prevent py26 DeprecatedWarning:
if name != 'message' or sys.version_info < (2.6):
value = pydoc.text.repr(getattr(evalue, name))
s['exception'][name] = value
I was just going to erase the "or sys.version_info < (2.6)" but I'm thinking, can't I just completely remove all these lines, what's the problem with the name being different from message?