fix flake8

This commit is contained in:
Tomas Kopecek 2022-05-04 15:25:36 +02:00
parent b0a2875f7e
commit f72f033465
2 changed files with 6 additions and 6 deletions

View file

@ -15516,11 +15516,11 @@ def handle_upload(environ):
logger.error(f"Error reading upload. Offset {offset}+{size}, path {fn}")
if 'timeout' in str_e:
logger.exception("Timed out reading input stream. "
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
raise RequestTimeout(str_e)
else:
logger.exception("Error reading input stream. "
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
raise BadRequest(str_e)
if not chunk:
break

View file

@ -219,12 +219,12 @@ class ModXMLRPCRequestHandler(object):
except OSError as e:
str_e = str(e)
if 'timeout' in str_e:
self.logger.exception("Timed out reading input stream. "
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
self.logger.exception("Timed out reading input stream. Content-Length: "
f"{context.environ.get('CONTENT_LENGTH')}")
raise RequestTimeout(str_e)
else:
self.logger.exception("Error reading input stream. "
f"Content-Length: {context.environ.get('CONTENT_LENGTH')}")
self.logger.exception("Error reading input stream. Content-Length: "
f"{context.environ.get('CONTENT_LENGTH')}")
raise BadRequest(str_e)
if not chunk:
break