Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/management/bin/generateNotifications.py

Issue 6582297721569280: Issue 2275 - Parse notification groups (Closed)
Patch Set: Address comments, parse sample Created April 15, 2015, 8:39 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sitescripts/notifications/parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/management/bin/generateNotifications.py
===================================================================
--- a/sitescripts/management/bin/generateNotifications.py
+++ b/sitescripts/management/bin/generateNotifications.py
@@ -23,6 +23,10 @@
def generate_notifications(path):
notifications = load_notifications()
+ # Ignoring notifications with variants here - we can only process those in a
+ # URL handler.
+ notifications["notifications"] = [x for x in notifications
+ if "variants" not in x]
with codecs.open(path, "wb", encoding="utf-8") as file:
json.dump(notifications, file, ensure_ascii=False, indent=2,
separators=(',', ': '), sort_keys=True)
« no previous file with comments | « no previous file | sitescripts/notifications/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld