diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index c3307e33f..edab21fa1 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -399,7 +399,7 @@ class TorrentManager(component.Component): else: self.session.remove_torrent(torrent_handle, 1) - metadata = '' + metadata = b'' if isinstance(torrent_info, lt.torrent_info): log.debug('metadata received') metadata = torrent_info.metadata() diff --git a/deluge/tests/test_core.py b/deluge/tests/test_core.py index 62be33e9e..1bf5af265 100644 --- a/deluge/tests/test_core.py +++ b/deluge/tests/test_core.py @@ -317,7 +317,7 @@ class CoreTestCase(BaseTestCase): def test_prefetch_metadata_existing(self): """Check another call with same magnet returns existing deferred.""" magnet = 'magnet:?xt=urn:btih:ab570cdd5a17ea1b61e970bb72047de141bce173' - expected = ('ab570cdd5a17ea1b61e970bb72047de141bce173', '') + expected = ('ab570cdd5a17ea1b61e970bb72047de141bce173', b'') def on_result(result): self.assertEqual(result, expected)