[commands] Fix AttributeError for classes missing convert attribute
This commit is contained in:
parent
8da6b47a36
commit
0efb720cec
@ -444,7 +444,7 @@ class Command(_BaseCommand):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if inspect.isclass(converter):
|
if inspect.isclass(converter):
|
||||||
if inspect.ismethod(converter.convert):
|
if inspect.ismethod(getattr(converter, 'convert', None)):
|
||||||
if converter.convert.__self__ is converter:
|
if converter.convert.__self__ is converter:
|
||||||
# class method
|
# class method
|
||||||
func = converter.convert
|
func = converter.convert
|
||||||
|
Loading…
x
Reference in New Issue
Block a user