mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
AnnounceShare: rewrite getSupportedProtocols() using set(). Thanks to @imachug.
This commit is contained in:
parent
acc3f836bb
commit
a61df634e4
|
@ -73,14 +73,14 @@ class TrackerStorage(object):
|
|||
|
||||
supported_trackers = self.site_announcer.getSupportedTrackers()
|
||||
|
||||
protocols = {}
|
||||
protocols = set()
|
||||
for tracker_address in supported_trackers:
|
||||
protocol = self.getNormalizedTrackerProtocol(tracker_address)
|
||||
if not protocol:
|
||||
continue
|
||||
protocols[protocol] = True
|
||||
protocols.add(protocol)
|
||||
|
||||
protocols = list(protocols.keys())
|
||||
protocols = list(protocols)
|
||||
|
||||
self.log.debug("Supported tracker protocols: %s" % protocols)
|
||||
|
||||
|
|
Loading…
Reference in a new issue