From 1aa2bf92505da27320b37b53244fb9715062ab04 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Wed, 29 Apr 2015 10:41:39 -0700 Subject: [PATCH] test-ovsdb: Fix conditional statement. 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 Acked-by: Russell Bryant --- tests/test-ovsdb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index 250f67114d4..4f8d7cac574 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -240,7 +240,10 @@ def idl_set(idl, commands, step): 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