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
This commit is contained in:
calvin 2005-10-10 22:10:32 +00:00
parent 57c9f325a9
commit 2bba7df3e7

View file

@ -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