- if ('event_type' in ev and
- ev['event_type'] == 'create' and
- ev["object_kind"] == "arvados#collection"):
- print "A new collection was created %s" % ev['object_uuid']
+ if ev.get("event_type") == "create" and ev.get("object_kind") == "arvados#collection":
+ print "A new collection was created: %s" % ev["object_uuid"]