Closed Bug 812286 Opened 13 years ago Closed 13 years ago

BaseException.message deprecated as of Python 2.6

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox19 fixed, firefox20 fixed, firefox21 fixed, firefox22 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
mozilla19
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
firefox21 --- fixed
firefox22 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(1 file)

In errors.py we inherit from BaseException instead of Exception. This causes Python to spit out a deprecation warning which aki theorizes is causing mozharness to read the exception messages wrongly.
I was wrong, it wasn't that we were subclassing BaseException, it's that we were setting the self.message attribute which is apparently already defined and also deprecated. To work around, I changed the name of the variable to avoid collision. I wasn't able to reproduce the deprecation warning locally for some reason, but this should fix it. I at least tested to make sure it won't cause any harm. I also switched str() to repr() as that will give us better string representations if we happen to pass in arbitrary objects as the message.
Attachment #682149 - Flags: review?(jgriffin)
Actually on second thought, I'll just leave it as str().. won't bother uploading a new patch though.
Comment on attachment 682149 [details] [diff] [review] Patch 1.0 - Fix deprecation warning Cool, thanks.
Attachment #682149 - Flags: review?(jgriffin) → review+
Whiteboard: [automation-needed-in-aurora]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
This didn't end up being the reason for mozharness reading the error messages wrong so I'm not going to bother porting it to aurora.
Whiteboard: [automation-needed-in-aurora]
This needs to be uplifted to mozilla-b2g18/v1_0_1 to resolve the perma-orange Mn tests. It's test-only.
Keywords: checkin-needed
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: