Code review comment for lp:~mvo/software-center/de-duplication-multiple-pkgnames-lp1043159

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Michael, when running this branch I'm hitting two exceptions, one at startup as shown:

Traceback (most recent call last):
  File "/home/tremolux/Projects/quantal/software-center_de-duplication_multiple_pkgnames_lp1043159_tweak/software-center/softwarecenter/db/categories.py", line 188, in _recommend_me_result
    self.query = self.db.get_query_for_pkgnames(pkgs)
AttributeError: 'RecommendedForYouCategory' object has no attribute 'db'

And the other when viewing the app details view:

Traceback (most recent call last):
  File "/home/tremolux/Projects/quantal/software-center_de-duplication_multiple_pkgnames_lp1043159_tweak/software-center/softwarecenter/db/categories.py", line 230, in _recommend_app_result
    self.query = self.db.get_query_for_pkgnames(pkgs)
AttributeError: 'AppRecommendationsCategory' object has no attribute 'db'

It seems we are just missing passing the db into a couple of classes. I made a small branch that should take care of these issues, and also updates the unit tests per the changes. Please check it over and feel free to use it if it looks right to you:

  lp:~gary-lasker/software-center/de-duplication-multiple-pkgnames-lp1043159-tweak

I will approve the branch in any case, please feel free to merge with the needed fix (or I can do it tomorrow).

Many thanks!

review: Approve

« Back to merge proposal