mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 18:41:54 +08:00
lint fixes
This commit is contained in:
@@ -138,6 +138,8 @@ def make_json_exception(err: Exception, status: int) -> aiohttp.web.Response:
|
||||
# =====
|
||||
async def get_multipart_field(reader: aiohttp.MultipartReader, name: str) -> aiohttp.BodyPartReader:
|
||||
field = await reader.next()
|
||||
if not isinstance(field, aiohttp.BodyPartReader):
|
||||
raise ValidatorError(f"Expected body part as {name!r} field")
|
||||
if not field or field.name != name:
|
||||
raise ValidatorError(f"Missing {name!r} field")
|
||||
return field
|
||||
|
||||
Reference in New Issue
Block a user