Deprecate exception.message usages

Review Request #3201 - Created Dec. 2, 2015 and submitted

Information
Peiyu Wang
pants
2656
472aedc...
Reviewers
pants-reviews
benjyw, patricklaw, stuhood, zundel
In fb30d2d

     if isinstance(cause, UnreadableArtifact):
       return (target_address, cause.err.message)

However, `exception.message` isn't always a string, it's `args[0]` whatever is passed as first argument [1],
maybe string, maybe another wrapped exception. This results a later error when called by json.dump [2]

Further, `exception.message` is deprecated in python 3 [1], this PR drops such usages

[1] https://www.python.org/dev/peps/pep-0352
[2] bug stacktrace

  File "/Users/peiyu/.pex/install/pantsbuild.pants-0.0.0_fb30d2db66b95d2bb602cbaae60037c18d2710b6-py2-none-any.whl.5632d5cbfcdd1b48dcdcbd328644dfab1f356c58/pantsbuild.pants-0.0.0_fb30d2db66b95d2bb602cbaae60037c18d2710b6-py2-none-any.whl/pants/goal/run_tracker.py", line 263, in store_stats
    safe_file_dump(stats_file, json.dumps(stats))
...
Exception message: ConnectionError(ProtocolError('Connection aborted.', gaierror(8, 'nodename nor servnam

https://travis-ci.org/pantsbuild/pants/builds/94495459

Stu Hood
Eric Ayers
Peiyu Wang
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 05136add54de0e03a432f631b191217c3a0df084

Loading...