From 2bba7df3e71e4e67c8c3dd02c733cbf1ef0c7b2c Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 10 Oct 2005 22:10:32 +0000 Subject: [PATCH] handle case where func.__doc__ is None git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2837 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/decorators.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linkcheck/decorators.py b/linkcheck/decorators.py index 53e309a1..dd76a403 100644 --- a/linkcheck/decorators.py +++ b/linkcheck/decorators.py @@ -53,7 +53,8 @@ def deprecated (func): category=DeprecationWarning) return func(*args, **kwargs) newfunc.__name__ = func.__name__ - newfunc.__doc__ += func.__doc__ + if func.__doc__ is not None: + newfunc.__doc__ += func.__doc__ newfunc.__dict__.update(func.__dict__) return newfunc @@ -97,7 +98,8 @@ def _synchronized (lock, func): finally: lock.release() newfunc.__name__ = func.__name__ - newfunc.__doc__ += func.__doc__ + if func.__doc__ is not None: + newfunc.__doc__ += func.__doc__ newfunc.__dict__.update(func.__dict__) return newfunc @@ -125,6 +127,7 @@ def notimplemented (func): """ raise NotImplementedError("%s not implemented" % func.__name__) newfunc.__name__ = func.__name__ - newfunc.__doc__ = func.__doc__ + if func.__doc__ is not None: + newfunc.__doc__ = func.__doc__ newfunc.__dict__.update(func.__dict__) return newfunc