BlobAvailabilityTracker.sample bug, remove whitespace

This commit is contained in:
Jack 2016-12-17 20:05:27 -05:00
parent 5a76a03cb6
commit 0044d6cf75
2 changed files with 1 additions and 4 deletions

View file

@ -80,7 +80,6 @@ class BlobAvailabilityTracker(object):
d = self._get_most_popular()
d.addCallback(lambda _: self._set_mean_peers())
def _update_mine(self):
def _get_peers(blobs):
dl = []
@ -89,7 +88,7 @@ class BlobAvailabilityTracker(object):
return defer.DeferredList(dl)
def sample(blobs):
return random.sample(blobs, 100)
return random.sample(blobs, min(len(blobs), 100))
start = time.time()
log.debug('==> Updating the peers for my blobs')

View file

@ -919,7 +919,6 @@ class LBRYumWallet(Wallet):
func = getattr(self.cmd_runner, cmd.name)
return defer.succeed(func(*args))
# run commands as a deferToThread, lbryum commands that only make
# queries to lbryum server should be run this way
def _run_cmd_as_defer_to_thread(self, command_name, *args):
@ -1055,7 +1054,6 @@ class LBRYumWallet(Wallet):
return defer.succeed(val)
class LBRYcrdAddressRequester(object):
implements([IRequestCreator])