From 6af1b12a83b17dde3ce2315d704ca02ab0d51ea7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 18 Feb 2012 15:48:33 -0500 Subject: [PATCH] Fix doctest format for socket.setdefaulttimeout call. Also clear the class-wide resolver cache before the Resolver doctests. --- apachelog/resolve.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apachelog/resolve.py b/apachelog/resolve.py index 9d8b66c..d825c17 100644 --- a/apachelog/resolve.py +++ b/apachelog/resolve.py @@ -12,9 +12,10 @@ class Resolver (object): >>> import socket >>> if hasattr(_socket, 'setdefaulttimeout'): - >>> socket.setdefaulttimeout(5) # set 5 second timeout + ... socket.setdefaulttimeout(5) # set 5 second timeout >>> r = Resolver() + >>> r.IP = {} # clear cache of date from previous tests >>> r.resolve('198.41.0.4') 'a.root-servers.net' >>> r.IP -- 2.26.2