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

Unified Diff: sitescripts/notifications/parser.py

Issue 29500676: Issue 5456 - Add support to specify urlFilters in the notification repository (Closed)
Patch Set: Created July 28, 2017, 3:31 p.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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/notifications/parser.py
diff --git a/sitescripts/notifications/parser.py b/sitescripts/notifications/parser.py
index 3593ee80d3107d1d34fb4dfcc2861892129b049a..4fbc92a7031399f8b141f13d8675f0b3fee1d075 100644
--- a/sitescripts/notifications/parser.py
+++ b/sitescripts/notifications/parser.py
@@ -92,6 +92,9 @@ def _parse_notification(data, name):
current[key] = datetime.datetime.strptime(value, '%Y-%m-%dT%H:%M')
elif key == 'interval':
current[key] = int(value)
+ elif key == 'urls':
+ current['urlFilters'] = ["{}^$document".format(v.upper())
Vasily Kuznetsov 2017/08/03 17:08:52 Our style guide recommends single quotes and using
wspee 2017/08/04 08:41:23 Done.
+ for v in value.split()]
else:
raise Exception("Unknown parameter '%s' in file '%s'" % (key, name))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld