mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Fix pep8 codestyle warnings
This commit is contained in:
parent
dfdda2c871
commit
db9ce032a4
21 changed files with 71 additions and 47 deletions
|
@ -131,12 +131,14 @@ class ContentRepoResource(resource.Resource):
|
|||
request.setHeader('Content-Type', content_type)
|
||||
|
||||
# cache for at least a day.
|
||||
# XXX: we might want to turn this off for data we don't want to recommend
|
||||
# caching as it's sensitive or private - or at least select private.
|
||||
# don't bother setting Expires as all our matrix clients are smart enough to
|
||||
# be happy with Cache-Control (right?)
|
||||
request.setHeader('Cache-Control', 'public,max-age=86400,s-maxage=86400')
|
||||
|
||||
# XXX: we might want to turn this off for data we don't want to
|
||||
# recommend caching as it's sensitive or private - or at least
|
||||
# select private. don't bother setting Expires as all our matrix
|
||||
# clients are smart enough to be happy with Cache-Control (right?)
|
||||
request.setHeader(
|
||||
"Cache-Control", "public,max-age=86400,s-maxage=86400"
|
||||
)
|
||||
|
||||
d = FileSender().beginFileTransfer(f, request)
|
||||
|
||||
# after the file has been sent, clean up and finish the request
|
||||
|
|
|
@ -138,8 +138,7 @@ class JsonResource(HttpServer, resource.Resource):
|
|||
)
|
||||
except CodeMessageException as e:
|
||||
if isinstance(e, SynapseError):
|
||||
logger.info("%s SynapseError: %s - %s", request, e.code,
|
||||
e.msg)
|
||||
logger.info("%s SynapseError: %s - %s", request, e.code, e.msg)
|
||||
else:
|
||||
logger.exception(e)
|
||||
self._send_response(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue