aboutsummaryrefslogtreecommitdiffstats
path: root/lib/find_devices
diff options
context:
space:
mode:
Diffstat (limited to 'lib/find_devices')
-rwxr-xr-xlib/find_devices21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/find_devices b/lib/find_devices
deleted file mode 100755
index 0b32eac..0000000
--- a/lib/find_devices
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/python
-
-import dbus
-import sys
-
-bus = dbus.SystemBus()
-proxy = bus.get_object("org.freedesktop.UDisks", "/org/freedesktop/UDisks")
-iface = dbus.Interface(proxy, "org.freedesktop.UDisks")
-
-devs = iface.EnumerateDevices()
-
-for dev in devs:
- dev_obj = bus.get_object("org.freedesktop.UDisks", dev)
- dev = dbus.Interface(dev_obj, "org.freedesktop.DBus.Properties")
-
- if str(dev.Get('', 'DriveConnectionInterface')) == 'usb' and not str(dev.Get('', 'PartitionType')) and str(dev.Get('', 'DeviceIsMediaAvailable')) == '1':
- path = str(dev.Get('', 'DeviceFile'))
- vend = str(dev.Get('', 'DriveVendor'))
- model = str(dev.Get('', 'DriveModel'))
- size = str(dev.Get('', 'DeviceSize'))
- print vend + ' ' + model + ', ' +path+', ' + size