diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2017-10-11 17:58:55 +1030 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-10-16 16:00:10 +0000 |
commit | 849ebeb7a0067341d5eb8073a8ee6493ae1ca614 (patch) | |
tree | 701a86b9957017c44d43c4ceb5ea64d5d32a9c73 /pytools | |
parent | 1133d8c3d8e60b8459b13f7433f8bb46d12f2733 (diff) | |
download | talos-skeleton-849ebeb7a0067341d5eb8073a8ee6493ae1ca614.tar.gz talos-skeleton-849ebeb7a0067341d5eb8073a8ee6493ae1ca614.zip |
pytools: obmcutil: Collapse redundant assignment and test
Change-Id: Ie461546c9056829b1b4a081a4031ac91c10e6a42
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'pytools')
-rw-r--r-- | pytools/obmcutil | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pytools/obmcutil b/pytools/obmcutil index 33a7e20..3cdfed9 100644 --- a/pytools/obmcutil +++ b/pytools/obmcutil @@ -109,11 +109,8 @@ def main(): if prop: dbus_iface = dbus.Interface(dbus_obj, "org.freedesktop.DBus.Properties") - val = None if objinfo.has_key('value'): - val = objinfo['value'] - if val is not None: - dbus_iface.Set(iface, prop, val) + dbus_iface.Set(iface, prop, objinfo['value']) else: dbus_prop = dbus_iface.Get(iface, prop) print '{:<20}: {}'.format(prop, str(dbus_prop)) |