Logging documentation updates.
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index ea1756b..1e6aa6f 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -8,8 +8,6 @@
This page contains a number of recipes related to logging, which have been found useful in the past.
-.. Contents::
-
.. currentmodule:: logging
Using logging in multiple modules
@@ -249,7 +247,8 @@
#!/usr/bin/env python
import socket, sys, struct
- data_to_send = open(sys.argv[1], 'r').read()
+ with open(sys.argv[1], 'rb') as f:
+ data_to_send = f.read()
HOST = 'localhost'
PORT = 9999