aboutsummaryrefslogtreecommitdiff
path: root/data/usr/bin/ayatana-webmail-reset
blob: d20fbcadf04e9a6ec0109bdeeb9e5e45734f86a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Ayatana Webmail, Remove all connection data from keyring
# Authors: Dmitry Shachnev <mitya57@gmail.com>
#          Robert Tari <robert@tari.in>
# License: GNU GPL 3 or higher; http://www.gnu.org/licenses/gpl.html

import sys
import secretstorage

if __name__ == '__main__':

    oBus = secretstorage.dbus_init()
    oCollection = secretstorage.get_default_collection(oBus)
    oCollection.unlock()

    try:

        for oItem in oCollection.search_items({'application': 'ayatana-webmail'}):
            oItem.delete()

    except:

        pass

    sys.exit(0)