Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Handle missing add-on blockID. #63

Merged
merged 6 commits into from
Feb 20, 2017
Merged

Conversation

Natim
Copy link
Contributor

@Natim Natim commented Feb 20, 2017

No description provided.

@Natim Natim added the bug label Feb 20, 2017
@Natim Natim requested a review from leplatrem February 20, 2017 10:43
Copy link
Contributor

@leplatrem leplatrem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but some comments would help ;)

else:
emItem = etree.SubElement(emItems, 'emItem',
blockID=item['blockID'])
blockID=item.get('blockID', item['id']))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have emItem.set('id' a few lines below, it's hard to follow without comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment, the item id is the guid (add-on id not the kinto blocklist id)

# Group by and keep the biggest blockID in the XML file.
if current_blockID > previous_blockID:
emItem.attrib['blockID'] = item['blockID']
if 'blockID' in item:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small comment explaining that in the new system blockID is not mandatory, but id is.

@Natim Natim merged commit 3f6cfeb into master Feb 20, 2017
@Natim Natim deleted the handle_addons_without_blockID branch February 20, 2017 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants