Okay, the patch looks reasonable. I am still testing it. What we need, though, is a clean version against 1.8.0 as DocTor does not work well with Stem's master right now, see (#40010 (closed) and child tickets). Could you attach such a thing?
Okay, it seems the Stem patch is still not enough:
* 97D2A26EA5C9972E66D23F4698E94DBDBA8F6C18 => Unable to download from DirPort (Endpoints must be an stem.ORPort or stem.DirPort. '('185.220.101.20', 0)' is a tuple.)
The script has no DirPort check anymore. It seems those errors come directly from Stem.
Okay, this is working, nice. @dgoulet: could you squash the commits and give a hint about the bug number in the commit message? Then we are ready for merging I think.