(self)
return succeed(self._location)
Returns a Deferred that fires with a NetLocation object for this
        router.
Returns a Deferred that fires with a NetLocation object for this
        router.
Returns a Deferred that fires with a NetLocation object for this router .
def get_location(self):
        """
        Returns a Deferred that fires with a NetLocation object for this
        router.
        """
        if self._location:
            return succeed(self._location)
        if self.ip != 'unknown':
            self._location = NetLocation(self.ip)
        else:
            self._location = NetLocation(None)
        if not self._location.countrycode and self.ip != 'unknown':
            # see if Tor is magic and knows more...
            d = self.controller.get_info_raw('ip-to-country/' + self.ip)
            d.addCallback(self._set_country)
            d.addCallback(lambda _: self._location)
            return d
        return succeed(self._location)
def get_location ( self ) : if self . _location : return succeed ( self . _location ) if self . ip != 'unknown' : self . _location = NetLocation ( self . ip ) else : self . _location = NetLocation ( None ) if not self . _location . countrycode and self . ip != 'unknown' : # see if Tor is magic and knows more... d = self . controller . get_info_raw ( 'ip-to-country/' + self . ip ) d . addCallback ( self . _set_country ) d . addCallback ( lambda _ : self . _location ) return d return succeed ( self . _location )