[GTK3] Fix ImportError has no attribute message

Python 3 exception objects now use `msg` but casting with `str()` is
better.
This commit is contained in:
hugosenari 2018-08-20 01:29:21 -03:00 committed by Calum Lind
commit 9f113eab23

View file

@ -331,7 +331,7 @@ class GtkUI(object):
'To use Standalone mode, stop local daemon and restart Deluge.' 'To use Standalone mode, stop local daemon and restart Deluge.'
) )
except ImportError as ex: except ImportError as ex:
if 'No module named libtorrent' in ex.message: if 'No module named libtorrent' in str(ex):
err_msg = _( err_msg = _(
'Only Thin Client mode is available because libtorrent is not installed.\n' 'Only Thin Client mode is available because libtorrent is not installed.\n'
'To use Standalone mode, please install libtorrent package.' 'To use Standalone mode, please install libtorrent package.'