| Summary: | app-portage/layman-1.1.1 throws an exception that should be trapped but isn't, so crash | ||
|---|---|---|---|
| Product: | Portage Development | Reporter: | Federico Moro <zayer> |
| Component: | Tools | Assignee: | Gunnar Wrobel (RETIRED) <wrobel> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | tools-portage |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | action.py.patch | ||
Created attachment 142047 [details, diff]
action.py.patch
Here is a patch for layman's action.py module that trap the exception and inform user that overlay doesn't exist in it's database.
guess I should release a new version soon. *** This bug has been marked as a duplicate of bug 198483 *** |
Looking for information of an overlay with `layman -i overlay_name`, if overlay doesn't exist, the callings to overlay object methods throws an AttributeError exception so self.rdb.select(i) returns a NoneType object. Trapping this exception program could inform user that overlay doesn't exist on the current layman db. Reproducible: Always Steps to Reproduce: 1. layman -i no_exist_overlay 2. 3. Actual Results: * None Traceback (most recent call last): File "/usr/bin/layman", line 37, in ? main() File "/usr/bin/layman", line 34, in main Actions(Config()) File "/usr/lib/python2.4/site-packages/layman/action.py", line 473, in __init__ result += i[1](config).run() File "/usr/lib/python2.4/site-packages/layman/action.py", line 296, in run if not overlay.is_official(): AttributeError: 'NoneType' object has no attribute 'is_official' Expected Results: * None * *** This overlay doesn't exist in layman DataBase *** *