~ubuntu-branches/ubuntu/natty/software-center/natty

« back to all changes in this revision

Viewing changes to utils/get_reviews_helper.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-04-15 18:28:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110415182815-5dsx2yim4s4xlkem
Tags: 3.1.26.5
* softwarecenter/backend/aptd.py:
  - do not crash if trans.error is None (LP: #761642)
* softwarecenter/view/appdetailsview_gtk.py, 
  softwarecenter/view/appdetailsview.py:
  - fix flickering during purchase install by more carefully 
    checking if the app just became availalbe
* utils/get_reviews_helper.py, utils/get_review_stats_helper.py:
  - fix crash when the server returns a API error (LP: #761452)
  - fix pyflakes warnins
* softwarecenter/db/reviews.py:
  - ensure pkgname is a str (and not unicode), otherwise 
    glib.spawn_async crashes (LP: #761357)
* softwarecenter/backend/zeitgeist_simple.py:
  - do not crash if a zeitgeist has no subjects (LP: #761905)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
 
3
import os
3
4
import pickle
4
5
import simplejson
5
 
import sys
6
6
import logging
7
7
 
8
8
from optparse import OptionParser
9
9
 
10
 
from softwarecenter.paths import *
11
 
from softwarecenter.backend.rnrclient import RatingsAndReviewsAPI, ReviewDetails
 
10
from softwarecenter.paths import SOFTWARE_CENTER_CACHE_DIR
 
11
from softwarecenter.backend.rnrclient import RatingsAndReviewsAPI
12
12
 
13
13
from piston_mini_client import APIError
14
14
 
56
56
    #bug lp:709408 - don't print 404 errors as traceback when api request 
57
57
    #                returns 404 error
58
58
    except APIError, e:
59
 
        LOG.warn("_get_reviews_threaded: no reviews able to be retrieved for package: %s (%s, origin: %s)" % (app.pkgname, distroseries, origin))
 
59
        LOG.warn("_get_reviews_threaded: no reviews able to be retrieved for package: %s (%s, origin: %s)" % (options.pkgname, options.distroseries, options.origin))
60
60
        LOG.debug("_get_reviews_threaded: no reviews able to be retrieved: %s" % e)
61
61
    except:
62
62
        LOG.exception("get_reviews")