openbmctool: local_users: Check for UserEnabled

The 'local_users' operations only deal with local users,
whose D-Bus objects all have the UserEnabled property.
LDAP users do not have this property, and so this can be
used to distinguished between the types.

Check that this property exists in the enumeration data
before trying to enable or disable a user so that it
doesn't try to operate on LDAP or other users.

Change-Id: Ia281adec9aa438ba48268cf701aab294413cdcde
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/thalerj/openbmctool.py b/thalerj/openbmctool.py
index ab2c7d9..1318d5d 100755
--- a/thalerj/openbmctool.py
+++ b/thalerj/openbmctool.py
@@ -2175,6 +2175,11 @@
 
     output = ""
     for user in usersDict['data']:
+
+        # Skip LDAP and another non-local users
+        if 'UserEnabled' not in usersDict['data'][user]:
+            continue
+
         name = user.split('/')[-1]
         url = "https://{hostname}{user}/attr/UserEnabled".format(hostname=host, user=user)