~robru/friends/lp_1135038

« back to all changes in this revision

Viewing changes to friends/protocols/flickr.py

  • Committer: Robert Bruce Park
  • Date: 2013-02-27 22:22:38 UTC
  • Revision ID: robert.park@canonical.com-20130227222238-rtomtp4p619utdht
More robust error handling logic.

Previously we were ignoring / incorrectly reporting errors from Flickr
and Twitter, while only Facebook had correct error handling. This
moves Facebook's good error handling code up into the Base class,
slightly generalised, so that it can be used by Flickr and Twitter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
            data=params or {},
71
71
            )
72
72
 
73
 
        return Downloader(
 
73
        response = Downloader(
74
74
            REST_SERVER,
75
75
            params=params,
76
76
            headers=headers,
77
77
            method=method,
78
78
            ).get_json()
 
79
        self._is_error(response)
 
80
        return response
79
81
 
80
82
# http://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html
81
83
    @feature