Commits

Luke Plant committed e8cc0b1

Refactoring

Comments (0)

Files changed (1)

gnome_keyring_import_export.py

     return c1 == c2
 
 def export_keyrings(to_file):
+    file(to_file, "w").write(json.dumps(get_gnome_keyrings(), indent=2))
+
+def get_gnome_keyrings():
     keyrings = {}
     for keyring_name in gnomekeyring.list_keyring_names_sync():
         keyring_items = []
             if item is not None:
                 keyring_items.append(item)
 
-    file(to_file, "w").write(json.dumps(keyrings, indent=2))
+    return keyrings
 
 def get_item(keyring_name, id):
     try: