'Returns the download\'s number of active connections. This is used
to see if there is any progress when non-fatal errors have occured
(e.g. tracker timeout).
@return An integer.'

def get_num_peers(self):

    if (self.stats is None):
        return 0
    statsobj = self.stats['stats']
    return (statsobj.numSeeds + statsobj.numPeers)
