def get_pem_entries(glob_path):
 ret = {}
 for path in glob.glob(glob_path):
  if os.path.isfile(path):
   try:
    ret[path] = get_pem_entry(text=path)
   except ValueError:
    pass
 return ret

def get_pem_entries ( glob_path ) : ret = { } for path in glob . glob ( glob_path ) : if os . path . isfile ( path ) : try : ret [ path ] = get_pem_entry ( text = path ) except ValueError : pass return ret
returns a dict containing pem entries in files matching a glob glob_path: a path to certificates to be read and returned .