From 55cd363f109438aa60cedf026ff8d85c75edcb9d Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 4 Nov 2018 18:54:11 +0000 Subject: [PATCH] remove unused variables --- radicale/app/get.py | 2 +- radicale/app/mkcalendar.py | 2 +- radicale/app/mkcol.py | 2 +- radicale/app/propfind.py | 2 +- radicale/app/proppatch.py | 2 +- radicale/app/put.py | 2 +- radicale/app/report.py | 2 +- radicale/storage/multifilesystem/cache.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/radicale/app/get.py b/radicale/app/get.py index 71e4d51..d38723e 100644 --- a/radicale/app/get.py +++ b/radicale/app/get.py @@ -49,7 +49,7 @@ class ApplicationGetMixin: value = "attachement" try: encoded_filename = quote(filename, encoding=self.encoding) - except UnicodeEncodeError as e: + except UnicodeEncodeError: logger.warning("Failed to encode filename: %r", filename, exc_info=True) encoded_filename = "" diff --git a/radicale/app/mkcalendar.py b/radicale/app/mkcalendar.py index a0b0048..129b058 100644 --- a/radicale/app/mkcalendar.py +++ b/radicale/app/mkcalendar.py @@ -39,7 +39,7 @@ class ApplicationMkcalendarMixin: logger.warning( "Bad MKCALENDAR request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT # Prepare before locking diff --git a/radicale/app/mkcol.py b/radicale/app/mkcol.py index 0a7cdd4..e6d3dda 100644 --- a/radicale/app/mkcol.py +++ b/radicale/app/mkcol.py @@ -40,7 +40,7 @@ class ApplicationMkcolMixin: logger.warning( "Bad MKCOL request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT # Prepare before locking diff --git a/radicale/app/propfind.py b/radicale/app/propfind.py index 770772f..bcaa80c 100644 --- a/radicale/app/propfind.py +++ b/radicale/app/propfind.py @@ -366,7 +366,7 @@ class ApplicationPropfindMixin: logger.warning( "Bad PROPFIND request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT with self.Collection.acquire_lock("r", user): diff --git a/radicale/app/proppatch.py b/radicale/app/proppatch.py index cfd282e..a924dc0 100644 --- a/radicale/app/proppatch.py +++ b/radicale/app/proppatch.py @@ -95,7 +95,7 @@ class ApplicationProppatchMixin: logger.warning( "Bad PROPPATCH request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT with self.Collection.acquire_lock("w", user): diff --git a/radicale/app/put.py b/radicale/app/put.py index 9242106..9fd7dfe 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -42,7 +42,7 @@ class ApplicationPutMixin: except RuntimeError as e: logger.warning("Bad PUT request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT # Prepare before locking diff --git a/radicale/app/report.py b/radicale/app/report.py index 1f6abc8..8c915fd 100644 --- a/radicale/app/report.py +++ b/radicale/app/report.py @@ -267,7 +267,7 @@ class ApplicationReportMixin: logger.warning( "Bad REPORT request on %r: %s", path, e, exc_info=True) return httputils.BAD_REQUEST - except socket.timeout as e: + except socket.timeout: logger.debug("client timed out", exc_info=True) return httputils.REQUEST_TIMEOUT with contextlib.ExitStack() as lock_stack: diff --git a/radicale/storage/multifilesystem/cache.py b/radicale/storage/multifilesystem/cache.py index 82fa400..250d0b9 100644 --- a/radicale/storage/multifilesystem/cache.py +++ b/radicale/storage/multifilesystem/cache.py @@ -91,7 +91,7 @@ class CollectionCacheMixin: cache_hash, *content = pickle.load(f) if cache_hash == input_hash: uid, etag, text, name, tag, start, end = content - except FileNotFoundError as e: + except FileNotFoundError: pass except (pickle.UnpicklingError, ValueError) as e: logger.warning("Failed to load item cache entry %r in %r: %s",