From 0594e9b14342c2bca8b574ffabbc58d5dcf80dab Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 26 Apr 2011 13:05:58 +0200 Subject: shutdown bdpoll thread on e2 shutdown this is needed for newer python versions... thanks to ritzmo fixes bug #671 --- lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/python/Plugins') diff --git a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py index 84cbbcb6..21b214a5 100644 --- a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py @@ -50,12 +50,12 @@ IOC_TYPESHIFT = (IOC_NRSHIFT+IOC_NRBITS) BLKRRPART = ((0x12< Date: Sun, 19 Jun 2011 18:44:49 +0200 Subject: Hotplug: also close thread on language change Previously after a language thread the bdpoll variable was overwritten leaving the old thread run forever and only closing the new one on shutdown (a language changes does NOT call the plugin close handler but the start handler is called again). so before creating a new bdpoll instance check if an old one exists and unset the running flag. Signed-off-by: Moritz Venn Signed-off-by: ghost --- lib/python/Plugins/SystemPlugins/Hotplug/plugin.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/python/Plugins') diff --git a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py index 21b214a5..e26a93c6 100644 --- a/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Hotplug/plugin.py @@ -256,6 +256,8 @@ def autostart(reason, **kwargs): self.__lock.release() netlink = Netlink() + if bdpoll is not None: + bdpoll.running = False bdpoll = BDPoll() for blockdev, removable, is_cdrom, medium_found in harddiskmanager.devices_scanned_on_init: if removable or is_cdrom: -- cgit v1.2.3