kspi / dmenu-frecency

A dmenu-based desktop application launcher
MIT License
33 stars 8 forks source link

fix: Application object comparison for option "Preselect last visited app" #9

Closed willemw12 closed 9 years ago

willemw12 commented 9 years ago

Also check for None value.

firecat53 commented 9 years ago

After updating to latest master:

$ dmenu-frecency 
Traceback (most recent call last):
  File "/usr/local/bin/dmenu-frecency", line 288, in <module>
    DmenuFrecency(arguments).main()
  File "/usr/local/bin/dmenu-frecency", line 253, in main
    for app in self.state.apps_by_frecency():
  File "/usr/local/bin/dmenu-frecency", line 90, in apps_by_frecency
    if app != app_last_visit and app not in self.frecency_cache:
  File "/usr/local/bin/dmenu-frecency", line 57, in __eq__
    return self.name == other.name
AttributeError: 'NoneType' object has no attribute 'name'

I'm assuming this pull request is to fix this error?

Thanks!

willemw12 commented 9 years ago

Yes, it should fix this error.