openbmctool: Ignore sensor associations

The sensors namespace also has associations in now it that are used to
point back to the inventory item they represent.  Skip these
associations when printing sensors by checking the number of segments in
the D-Bus path.

Change-Id: I8dd6eb5ceca0e392d76312012e1fe49b4471ff1d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/thalerj/openbmctool.py b/thalerj/openbmctool.py
old mode 100644
new mode 100755
index 7eee2d3..d7e9fba
--- a/thalerj/openbmctool.py
+++ b/thalerj/openbmctool.py
@@ -530,6 +530,14 @@
         for key in sensors:
             senDict = {}
             keyparts = key.split("/")
+
+            # Associations like the following also show up here:
+            # /xyz/openbmc_project/sensors/<type>/<name>/<assoc-name>
+            # Skip them.
+            # Note:  keyparts[0] = '' which is why there are 7 segments.
+            if len(keyparts) > 6:
+                continue
+
             senDict['sensorName'] = keyparts[-1]
             senDict['type'] = keyparts[-2]
             try:
@@ -4768,7 +4776,7 @@
          main function for running the command line utility as a sub application
     """
     global toolVersion
-    toolVersion = "1.15"
+    toolVersion = "1.16"
     global isRedfishSupport
 
     parser = createCommandParser()