From: Daira Hopwood Date: Thu, 19 Feb 2015 17:41:09 +0000 (+0000) Subject: Discourage future readers of iputil.py from using Win32 APIs in preference to route... X-Git-Tag: allmydata-tahoe-1.10.1a1~67 X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/frontends/%22doc.html/install.html?a=commitdiff_plain;h=5a37ff0d0eaccafd55d3121aafb9c8bf92b43fe0;p=tahoe-lafs%2Ftahoe-lafs.git Discourage future readers of iputil.py from using Win32 APIs in preference to route.exe. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/util/iputil.py b/src/allmydata/util/iputil.py index d58c578a..4b90b250 100644 --- a/src/allmydata/util/iputil.py +++ b/src/allmydata/util/iputil.py @@ -142,8 +142,10 @@ def get_local_ip_for(target): # Wow, I'm really amazed at home much mileage we've gotten out of calling # the external route.exe program on windows... It appears to work on all -# versions so far. Still, the real system calls would much be preferred... +# versions so far. # ... thus wrote Greg Smith in time immemorial... +# Also, the Win32 APIs for this are really klunky and error-prone. --Daira + _win32_re = re.compile(r'^\s*\d+\.\d+\.\d+\.\d+\s.+\s(?P
\d+\.\d+\.\d+\.\d+)\s+(?P\d+)\s*$', flags=re.M|re.I|re.S) _win32_commands = (('route.exe', ('print',), _win32_re),)