File: cleanup_test_items.py

package info (click to toggle)
python-secretstorage 3.3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 256 kB
  • sloc: python: 697; makefile: 11; sh: 8
file content (13 lines) | stat: -rwxr-xr-x 347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python3

from contextlib import closing
import secretstorage

with closing(secretstorage.dbus_init()) as connection:
    items = secretstorage.search_items(
        connection, {'application': 'secretstorage-test'}
    )

    for item in items:
        print('Deleting item with label %r.' % item.get_label())
        item.delete()