if not 'filename' in entry:

more pythonic