[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] GETINFO ip-to-country error



commit 99396db33e19bfa3f046382cea0600983a15ea33
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Oct 15 16:28:58 2020 -0700

    GETINFO ip-to-country error
    
    Oops, forgot to await one of our internal coroutine calls...
    
      stem/control.py:1236: RuntimeWarning: coroutine 'Controller.get_info' was never awaited
---
 stem/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/control.py b/stem/control.py
index 9a387f55..b889b801 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1233,7 +1233,7 @@ class Controller(BaseController):
       param_set = set(params)
 
     for param in param_set:
-      if param.startswith('ip-to-country/') and param != 'ip-to-country/0.0.0.0' and self.get_info('ip-to-country/ipv4-available', '0') != '1':
+      if param.startswith('ip-to-country/') and param != 'ip-to-country/0.0.0.0' and await self.get_info('ip-to-country/ipv4-available', '0') != '1':
         raise stem.ProtocolError('Tor geoip database is unavailable')
       elif param == 'address' and self._last_address_exc:
         raise self._last_address_exc  # we already know we can't resolve an address



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits