- pass
-# if action == 'add' and device.is_hotplug:
-# print "mountpoint", device.mountpoint
-# print "description", device.description
-# print "force_mounted", device.force_mounted
-# mountpoint_choosen((device.description, device.mountpoint, global_session))
+ if InfoBar.instance:
+ if InfoBar.instance.execing:
+ if action == 'add' and device.is_hotplug:
+ print "mountpoint", device.mountpoint
+ print "description", device.description
+ print "force_mounted", device.force_mounted
+ mountpoint_choosen((device.description, device.mountpoint, global_session))
+ else:
+ print "main infobar is not execing... so we ignore hotplug event!"
+ else:
+ print "hotplug event.. but no infobar"