示例#1
0
    except urllib2.HTTPError, e:
        if e.code == 404:
            return None
        # otherwise, bubble that crazy error up.
        raise e

    bug = Bug()

    metadata_dict = view_bug_table2dict(tree)

    bug.submitter_username = '' # FIXME: Find an example of this having a value
    bug.submitter_realname = '' # FIXME: Find an example of this having a value
    bug.date_reported = decode_datetime(metadata_dict['Submit Date'])
    bug.last_touched = decode_datetime(metadata_dict['Last Update Date'])
    bug.canonical_bug_link = remote_bug_url
    bug.good_for_newcomers = 'oss-bite-size' in metadata_dict['Keywords']
    bug.status = metadata_dict['State']
    status_number = int(bug.status.split('-')[0])
    bug.looks_closed = (status_number in (8, 10, 11))
    bug.title = metadata_dict['Synopsis']
    bug.importance = '' # No importance, as far as I can tell.

    # For description, just grab the first "message"
    bug.description = metadata_dict['Description']

    # We are always the project called Python.
    bug.project, _ = Project.objects.get_or_create(name='OpenSolaris OS/Net', language='C')

    # How many people participated?
    bug.people_involved = None # This tracker has no idea.