From 9466fe88a7cf586052a35537f50859fef8284d25 Mon Sep 17 00:00:00 2001
From: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Date: Mon, 13 Dec 2010 08:54:02 +0000
Subject: [PATCH] Logging documentatio update.

---
 Doc/library/logging.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 490f69ff04e..b59315e0185 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -167,7 +167,8 @@ following example::
    # command line argument. Convert to upper case to allow the user to
    # specify --log=DEBUG or --log=debug
    numeric_level = getattr(logging, loglevel.upper(), None)
-   assert numeric_level is not None, 'Invalid log level: %s' % loglevel
+   if not isinstance(numeric_level, int):
+       raise ValueError('Invalid log level: %s' % loglevel)
    logging.basicConfig(level=numeric_level, ...)
 
 The call to :func:`basicConfig` should come *before* any calls to :func:`debug`,