Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if referenced item deleted #118

Open
firecat53 opened this issue Jun 4, 2022 · 0 comments
Open

Crash if referenced item deleted #118

firecat53 opened this issue Jun 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@firecat53
Copy link
Owner

If a Keepass reference is used in an entry and the referenced item is deleted, keepmenu will crash with:

Traceback (most recent call last):
  File "/usr/lib64/python3.10/multiprocessing/process.py", line 315, in _bootstrap
	self.run()
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/keepmenu/keepmenu.py", line 305, in run
	self.dmenu_run()
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/keepmenu/keepmenu.py", line 373, in dmenu_run
	sel = view_all_entries(list(options), filtered_entries, self.database.dbase)
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/keepmenu/view.py", line 21, in view_all_entries
	kps = str("\n").join([kp_entry_pattern.format(j,
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/keepmenu/view.py", line 23, in <listcomp>
	i.deref('title') or ""),
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/venv/lib64/python3.10/site-packages/pykeepass/entry.py", line 119, in deref
	return self._kp.deref(getattr(self, attribute))
  File "/home/firecat53/docs/family/scott/src/projects/keepmenu/venv/lib64/python3.10/site-packages/pykeepass/pykeepass.py", line 478, in deref
	value = value.replace(ref, getattr(ref_entry, wanted_field))
AttributeError: 'NoneType' object has no attribute 'title'
@firecat53 firecat53 added the bug Something isn't working label Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant