pytools: obmcutil: Assign None to val by default
And remove a now-redundant branch.
Change-Id: I92e91cfb307a98cd60a26e5e5d34bf0ddc384d3f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/pytools/obmcutil b/pytools/obmcutil
index 48b90dd..3234e8a 100644
--- a/pytools/obmcutil
+++ b/pytools/obmcutil
@@ -109,13 +109,12 @@
if prop:
dbus_iface = dbus.Interface(dbus_obj, "org.freedesktop.DBus.Properties")
+ val = None
if objinfo.has_key('value'):
val = objinfo['value']
else:
if len(sys.argv) > 0:
val = eval(sys.argv.pop(0))
- else:
- val = None
if val is not None:
dbus_iface.Set(iface, prop, val)
else: