diff options
author | Robert Tari <robert@tari.in> | 2020-08-17 17:40:59 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2020-08-17 17:40:59 +0200 |
commit | 711050055339f6a14f0c3da4d3d28f707b97a102 (patch) | |
tree | 7c69fbc7809bc1592bab47c811c6d9e4ddf964da /data/usr/bin/ayatana-webmail-reset | |
download | ayatana-webmail-711050055339f6a14f0c3da4d3d28f707b97a102.tar.gz ayatana-webmail-711050055339f6a14f0c3da4d3d28f707b97a102.tar.bz2 ayatana-webmail-711050055339f6a14f0c3da4d3d28f707b97a102.zip |
Initial port from Unity Mail
Diffstat (limited to 'data/usr/bin/ayatana-webmail-reset')
-rwxr-xr-x | data/usr/bin/ayatana-webmail-reset | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/data/usr/bin/ayatana-webmail-reset b/data/usr/bin/ayatana-webmail-reset new file mode 100755 index 0000000..d20fbca --- /dev/null +++ b/data/usr/bin/ayatana-webmail-reset @@ -0,0 +1,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) + |