mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-05-07 23:27:26 +02:00
Bug fix in i18n.py (decorated commands without docstring raise an error)
This commit is contained in:
parent
79930a7435
commit
c0ff3c3f92
@ -309,6 +309,8 @@ def internationalizeDocstring(obj):
|
|||||||
"""Decorates functions and internationalize their docstring.
|
"""Decorates functions and internationalize their docstring.
|
||||||
|
|
||||||
Only useful for commands (commands' docstring is displayed on IRC)"""
|
Only useful for commands (commands' docstring is displayed on IRC)"""
|
||||||
|
if obj.__doc__ == None:
|
||||||
|
return obj
|
||||||
if sys.modules[obj.__module__].__dict__.has_key('_'):
|
if sys.modules[obj.__module__].__dict__.has_key('_'):
|
||||||
internationalizedCommands.update({hash(obj): obj})
|
internationalizedCommands.update({hash(obj): obj})
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user