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

zabdig fails when store is locked #25

Closed
osso-rkuper opened this issue Sep 30, 2022 · 0 comments
Closed

zabdig fails when store is locked #25

osso-rkuper opened this issue Sep 30, 2022 · 0 comments

Comments

@osso-rkuper
Copy link

problem:

Traceback (most recent call last):
  File "/usr/bin/zabdig", line 656, in <module>
    main()
  File "/usr/bin/zabdig", line 595, in main
    (user, password) = get_from_secret_storage(args.section)
  File "/usr/bin/zabdig", line 528, in get_from_secret_storage
    res[0].ensure_not_locked()
  File "/home/robin/.virtualenvs/kubernetes-ansible/lib/python3.10/site-packages/secretstorage/item.py", line 49, in ensure_not_locked
    raise LockedException('Item is locked!')
secretstorage.exceptions.LockedException: Item is locked!

fix:

--- /usr/bin/zabdig	2022-09-15 11:17:37.000000000 +0200
+++ zabdig	2022-09-30 11:47:12.660298476 +0200
@@ -507,6 +507,8 @@ def get_from_secret_storage(section):
         attrs = {'application': 'zabdig'}
         if section:
             attrs['section'] = section
+        if coll.is_locked():
+            coll.unlock()
         res = [i for i in coll.search_items(attrs)]
         # FIXME: add 'or True' to overwrite previous passwords
         if not res:   # or True:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant