Created
June 6, 2014 05:49
-
-
Save fourdollars/8bc92cb87fe1d236b3c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from gi.repository import GLib, UDisks | |
no_options = GLib.Variant('a{sv}', {}) | |
udisks = UDisks.Client.new_sync(None) | |
manager = udisks.get_object_manager() | |
for item in manager.get_objects(): | |
part = item.get_partition() | |
swap = item.get_swapspace() | |
if not swap or not part: | |
continue | |
block = item.get_block() | |
print(block.props.id_uuid) | |
print(block.props.device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment