[Bug 900404] Re: follow-recommends throws an attribute error when passed None
Launchpad Bug Tracker
900404 at bugs.launchpad.net
Wed Dec 7 01:49:28 UTC 2011
** Branch linked: lp:germinate
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to germinate in Ubuntu.
https://bugs.launchpad.net/bugs/900404
Title:
follow-recommends throws an attribute error when passed None
Status in “germinate” package in Ubuntu:
Fix Committed
Bug description:
I'm running germinate from trunk, revision 461, and I get the
following exception when running the command:
# /tmp/oneiric-server-amd64/germinate/bin/germinate -s ubuntu.oneiric -m http://archive.ubuntu.com/ubuntu/ -d oneiric -a amd64 -c main,universe --seed-packages server/checkbox-certification-server
Traceback (most recent call last):
File "/tmp/oneiric-server-amd64/germinate/bin/germinate", line 201, in <module>
main()
File "/tmp/oneiric-server-amd64/germinate/bin/germinate", line 152, in main
g.reverse_depends(structure)
File "/tmp/oneiric-server-amd64/germinate/bin/../germinate/germinator.py", line 1034, in reverse_depends
if (self._follow_recommends() or
File "/tmp/oneiric-server-amd64/germinate/bin/../germinate/germinator.py", line 1015, in _follow_recommends
if "follow-recommends" in seed.structure.features:
AttributeError: 'NoneType' object has no attribute 'structure'
The problem seems to be with the following method in the Germinator
class:
def _follow_recommends(self, seed=None):
"""Test whether we should follow Recommends for this seed."""
if seed is not None:
if "follow-recommends" in seed._features:
return True
if "no-follow-recommends" in seed._features:
return False
if "follow-recommends" in seed.structure.features:
return True
return False
When passed None, the last conditional statement throws the exception.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/germinate/+bug/900404/+subscriptions
More information about the foundations-bugs
mailing list