[commands] Check for None max_concurrency

This commit is contained in:
z03h 2022-03-29 01:49:37 -07:00 committed by GitHub
parent 4fd2d5fdfd
commit 55695dab3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,9 +519,8 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
other.checks = self.checks.copy()
if self._buckets.valid and not other._buckets.valid:
other._buckets = self._buckets.copy()
if self._max_concurrency != other._max_concurrency:
# _max_concurrency won't be None at this point
other._max_concurrency = self._max_concurrency.copy() # type: ignore
if self._max_concurrency and self._max_concurrency != other._max_concurrency:
other._max_concurrency = self._max_concurrency.copy()
try:
other.on_error = self.on_error