#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Unity Mail, Remove all connection data from keyring
# Authors: Dmitry Shachnev <mitya57@gmail.com>
#          Robert Tari <robert.tari@gmail.com>
# 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()

    for oItem in oCollection.search_items({'application': 'unity-mail'}):
        oItem.delete()

    sys.exit(0)

