[commands] Fix _HelpCommandImpl.clean_params popitem

This commit is contained in:
Stella 2021-04-23 14:24:09 +08:00 committed by GitHub
parent 8e9860077d
commit 91c473db57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,8 +216,8 @@ class _HelpCommandImpl(Command):
def clean_params(self):
result = self.params.copy()
try:
result.popitem(last=False)
except Exception:
del result[next(iter(result))]
except StopIteration:
raise ValueError('Missing context parameter') from None
else:
return result