def _table_attrs(table):
 cmd = 'osqueryi --json "pragma table_info({0})"'.format(table)
 res = __salt__['cmd.run_all'](cmd)
 if (res['retcode'] == 0):
  attrs = []
  text = json.loads(res['stdout'])
  for item in text:
   attrs.append(item['name'])
  return attrs
 return False

def _table_attrs ( table ) : cmd = 'osqueryi --json "pragma table_info({0})"' . format ( table ) res = __salt__ [ 'cmd.run_all' ] ( cmd ) if ( res [ 'retcode' ] == 0 ) : attrs = [ ] text = json . loads ( res [ 'stdout' ] ) for item in text : attrs . append ( item [ 'name' ] ) return attrs return False
helper function to find valid table attributes .