would glob.glob work?
```
for ent_cert_file in glob.glob("ent_cert_dir/*.pem" % ent_cert_dir):
    log.debug("Removing identity cert: %s" % path)
    os.remove(path)

```