URI: 
       thw plugins: catch exceptions for custom enumeration functions. - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 192e8959339919ea29305573369ff40ce1e7eda2
   DIR parent b02252d664128b117fc6d6608f8f11b94fb329bb
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Wed,  7 Mar 2018 16:11:20 +0100
       
       hw plugins: catch exceptions for custom enumeration functions.
       
       related: #4060
       
       Diffstat:
         M lib/plugins.py                      |       8 +++++++-
       
       1 file changed, 7 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/lib/plugins.py b/lib/plugins.py
       t@@ -533,7 +533,13 @@ class DeviceMgr(ThreadJob, PrintError):
        
                # Let plugin handlers enumerate devices we don't know about
                for f in self.enumerate_func:
       -            devices.extend(f())
       +            try:
       +                new_devices = f()
       +            except BaseException as e:
       +                self.print_error('custom device enum failed. func {}, error {}'
       +                                 .format(str(f), str(e)))
       +            else:
       +                devices.extend(new_devices)
        
                # Now find out what was disconnected
                pairs = [(dev.path, dev.id_) for dev in devices]