gio does not report any removable media

Muayyad AlSadi alsadi at gmail.com
Thu Jul 30 19:43:38 UTC 2009


hello

I'm implementing media repo and they asked me to do it using GIO
and I did so, but while testing it I noticed that there is a bug in
GIO when running as root
and here is a small session of it

[alsadi at pc1 yum]$ python
Python 2.6 (r26:66714, Jun  8 2009, 16:07:26)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gio
>>> vm=gio.volume_monitor_get()
>>> filter(lambda d: d.is_media_removable(),vm.get_connected_drives())
[<__main__.GProxyDrive at 0x8429e8c: HL-DT-ST DVDRAM GH20NS10>]
>>> ^D
[alsadi at pc1 yum]$ su -l
Password:
[root at pc1 ~]# python
Python 2.6 (r26:66714, Jun  8 2009, 16:07:26)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gio
>>> vm=gio.volume_monitor_get()
>>> filter(lambda d: d.is_media_removable(),vm.get_connected_drives())
[]




More information about the devel mailing list