Index: sitescripts/notifications/parser.py |
=================================================================== |
--- a/sitescripts/notifications/parser.py |
+++ b/sitescripts/notifications/parser.py |
@@ -118,15 +118,13 @@ |
data = codecs.getreader("utf8")(archive.extractfile(fileinfo)) |
try: |
notification = _parse_notification(data, name) |
- if "inactive" in notification: |
- continue |
- current_time = datetime.datetime.now() |
- start = notification.pop("start", None) |
- if start is not None and current_time < start: |
- continue |
- end = notification.pop("end", None) |
- if end is not None and current_time > end: |
- continue |
+ if not "inactive" in notification: |
+ current_time = datetime.datetime.now() |
+ start = notification.pop("start", None) |
+ end = notification.pop("end", None) |
+ if ((start is not None and current_time < start) or |
+ (end is not None and current_time > end)): |
+ notification["inactive"] = True |
notifications.append(notification) |
except: |
traceback.print_exc() |