code: def list_keys(self):
          '''
          Return a dict of managed keys and what the key status are
          '''
          key_dirs = self._check_minions_directories()
  
          ret = {}
  
          for dir_ in key_dirs:
              if dir_ is None:
                  continue
              ret[os.path.basename(dir_)] = []
              try:
                  for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(dir_)):
                      if not fn_.startswith('.'):
                          if os.path.isfile(os.path.join(dir_, fn_)):
                              ret[os.path.basename(dir_)].append(
                                  salt.utils.stringutils.to_unicode(fn_)
                              )
              except (OSError, IOError):
                  # key dir kind is not created yet, just skip
                  continue
          return ref list_keys(self):
          '''
          Return a dict of managed keys and what the key status are
          '''
          key_dirs = self._check_minions_directories()
  
          ret = {}
  
          for dir_ in key_dirs:
              if dir_ is None:
                  continue
              ret[os.path.basename(dir_)] = []
              try:
                  for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(dir_)):
                      if not fn_.startswith('.'):
                          if os.path.isfile(os.path.join(dir_, fn_)):
                              ret[os.path.basename(dir_)].append(
                                  salt.utils.stringutils.to_unicode(fn_)
                              )
              except (OSError, IOError):
                  # key dir kind is not created yet, just skip
                  continue
          return ret
docs: Return a dict of managed keys and what the key status are