remove unused variables

This commit is contained in:
Unrud 2018-11-04 18:54:11 +00:00
parent edc20ed510
commit 55cd363f10
8 changed files with 8 additions and 8 deletions

View File

@ -49,7 +49,7 @@ class ApplicationGetMixin:
value = "attachement" value = "attachement"
try: try:
encoded_filename = quote(filename, encoding=self.encoding) encoded_filename = quote(filename, encoding=self.encoding)
except UnicodeEncodeError as e: except UnicodeEncodeError:
logger.warning("Failed to encode filename: %r", filename, logger.warning("Failed to encode filename: %r", filename,
exc_info=True) exc_info=True)
encoded_filename = "" encoded_filename = ""

View File

@ -39,7 +39,7 @@ class ApplicationMkcalendarMixin:
logger.warning( logger.warning(
"Bad MKCALENDAR request on %r: %s", path, e, exc_info=True) "Bad MKCALENDAR request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
# Prepare before locking # Prepare before locking

View File

@ -40,7 +40,7 @@ class ApplicationMkcolMixin:
logger.warning( logger.warning(
"Bad MKCOL request on %r: %s", path, e, exc_info=True) "Bad MKCOL request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
# Prepare before locking # Prepare before locking

View File

@ -366,7 +366,7 @@ class ApplicationPropfindMixin:
logger.warning( logger.warning(
"Bad PROPFIND request on %r: %s", path, e, exc_info=True) "Bad PROPFIND request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
with self.Collection.acquire_lock("r", user): with self.Collection.acquire_lock("r", user):

View File

@ -95,7 +95,7 @@ class ApplicationProppatchMixin:
logger.warning( logger.warning(
"Bad PROPPATCH request on %r: %s", path, e, exc_info=True) "Bad PROPPATCH request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
with self.Collection.acquire_lock("w", user): with self.Collection.acquire_lock("w", user):

View File

@ -42,7 +42,7 @@ class ApplicationPutMixin:
except RuntimeError as e: except RuntimeError as e:
logger.warning("Bad PUT request on %r: %s", path, e, exc_info=True) logger.warning("Bad PUT request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
# Prepare before locking # Prepare before locking

View File

@ -267,7 +267,7 @@ class ApplicationReportMixin:
logger.warning( logger.warning(
"Bad REPORT request on %r: %s", path, e, exc_info=True) "Bad REPORT request on %r: %s", path, e, exc_info=True)
return httputils.BAD_REQUEST return httputils.BAD_REQUEST
except socket.timeout as e: except socket.timeout:
logger.debug("client timed out", exc_info=True) logger.debug("client timed out", exc_info=True)
return httputils.REQUEST_TIMEOUT return httputils.REQUEST_TIMEOUT
with contextlib.ExitStack() as lock_stack: with contextlib.ExitStack() as lock_stack:

View File

@ -91,7 +91,7 @@ class CollectionCacheMixin:
cache_hash, *content = pickle.load(f) cache_hash, *content = pickle.load(f)
if cache_hash == input_hash: if cache_hash == input_hash:
uid, etag, text, name, tag, start, end = content uid, etag, text, name, tag, start, end = content
except FileNotFoundError as e: except FileNotFoundError:
pass pass
except (pickle.UnpicklingError, ValueError) as e: except (pickle.UnpicklingError, ValueError) as e:
logger.warning("Failed to load item cache entry %r in %r: %s", logger.warning("Failed to load item cache entry %r in %r: %s",