Old version of python does not support the following conditional
statement syntax in one assignment:
var = value1 if cond else value2
This commit fixes it by convert it back to use two assignments.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
old_notify = idl.notify
def notify(event, row, updates=None):
- upcol = updates._data.keys()[0] if updates else None
+ if updates:
+ upcol = updates._data.keys()[0]
+ else:
+ upcol = None
events.append("%s|%s|%s" % (event, row.i, upcol))
idl.notify = old_notify