projects
/
apachelog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0addcba
)
Fix doctest format for socket.setdefaulttimeout call.
author
W. Trevor King
<wking@drexel.edu>
Sat, 18 Feb 2012 20:48:33 +0000
(15:48 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Sat, 18 Feb 2012 20:48:33 +0000
(15:48 -0500)
Also clear the class-wide resolver cache before the Resolver doctests.
apachelog/resolve.py
patch
|
blob
|
history
diff --git
a/apachelog/resolve.py
b/apachelog/resolve.py
index 9d8b66c61830911d2dd8810acfdae672dbd328cb..d825c17e285cdfa3b2d721cd0946911ea8917b51 100644
(file)
--- 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