Closed
Bug 1441484
Opened 7 years ago
Closed 7 years ago
NameError in make_incremental_updates.py "global name 'exc' is not defined"
Categories
(Release Engineering :: Release Automation: Other, defect)
Release Engineering
Release Automation: Other
Tracking
(firefox60 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: jcristau, Assigned: jcristau)
References
Details
Attachments
(1 file)
In bug 1385780, "except Exception, exc" was replaced by "except Exception(exc)" instead of "except Exception as exc".
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8954306 -
Flags: review?(bhearsum)
Assignee | ||
Updated•7 years ago
|
Assignee: sledru → jcristau
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8954306 [details]
Bug 1441484 - fix error handling in make_incremental_updates.
https://reviewboard.mozilla.org/r/223428/#review229548
::: tools/update-packaging/test_make_incremental_updates.py:149
(Diff revision 1)
>
> def test_decode_filename(self):
> expected = {'locale': 'lang', 'platform': 'platform', 'product': 'product', 'version': '1.0', 'type': 'complete'}
> self.assertEquals(expected, mkup.decode_filename('product-1.0.lang.platform.complete.mar'))
> self.assertRaises(Exception, mkup.decode_filename, 'fail')
> + self.assertEquals(expected, mkup.decode_filename('platform/lang/product-1.0.complete.mar'))
The other way to make this test catch it is to raise a better exception and/or catch a more specific error message. This is fine though - thank you!
Attachment #8954306 -
Flags: review?(bhearsum) → review+
Assignee | ||
Comment 3•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8954306 [details]
Bug 1441484 - fix error handling in make_incremental_updates.
https://reviewboard.mozilla.org/r/223428/#review229548
> The other way to make this test catch it is to raise a better exception and/or catch a more specific error message. This is fine though - thank you!
I actually wrote this initially:
- self.assertRaises(Exception, mkup.decode_filename, 'fail')
+ with self.assertRaises(Exception) as cm:
+ mkup.decode_filename('fail')
+ self.assertTrue(cm.exception.args[0].startswith('could not parse filepath fail:'))
Wasn't sure if it was worth it, but I can pull that back in.
Comment hidden (mozreview-request) |
Pushed by jcristau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/179c83a1d28b
fix error handling in make_incremental_updates. r=bhearsum
Comment 6•7 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•