Code review comment for lp:~kai-mast/friends/facebook-link-picture-size

Revision history for this message
Robert Bruce Park (robru) wrote :

Looks mostly good, but here's some improvements you can make:

    if (message_id is None) or (message_type is None):

should be:

    if None in (message_id, message_type):

and then:

    if to and not (to is ""):

Not sure what you're even trying to do here. if "to" is an empty string, it will evaluate false in python. So this is already equivalent:

    if to:

then:

    place = entry.get('place') or {}
    location = place.get('location') or {}

should be:

    place = entry.get('place', {})
    location = place.get('location', {})

and:

    if not (picture_url is ''):

can be:

    if picture_url:

review: Needs Fixing

« Back to merge proposal