Closed
Bug 706981
Opened 14 years ago
Closed 14 years ago
mozrunner's get_metadata_from_egg function should catch DistributionNotFound errors
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ahal, Assigned: ahal)
Details
Attachments
(1 file)
|
620 bytes,
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
If you import mozrunner via folder (instead of setup.py installing) this line:
https://github.com/ahal/mozbase/blob/master/mozrunner/mozrunner/runner.py#L55
causes a:
pkg_resources.DistributionNotFound: mozrunner
error. We should add a try/catch so importing from folders is possible.
| Assignee | ||
Comment 1•14 years ago
|
||
Attachment #578401 -
Flags: review?(jhammel)
Comment 2•14 years ago
|
||
Comment on attachment 578401 [details] [diff] [review]
Patch 1.0 - Catch DistributionNotFound error
Good catch! For some reason I thought we already did this. Is returning an empty dict the thing to do or is None better? (not sure, tbh)
Attachment #578401 -
Flags: review?(jhammel) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
Not sure either, I just returned an empty dict because that's what we're already doing when an import error happens. Changing it to None might require some refactoring in runner.py so I'm just going to check this in for now.
master: https://github.com/mozilla/mozbase/commit/05a8469b63fd0ff91c488dbce9eab982f0aaac97
Assignee: nobody → ahalberstadt
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•