1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-21 01:14:49 +00:00

Minor formatting changes per codacy review.

This commit is contained in:
Michael Shavit
2020-01-26 01:12:52 -05:00
parent cd9bb56db5
commit d30b44ee0f
3 changed files with 5 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ class SyncToken():
@staticmethod
def from_headers(headers):
sync_token_header = headers.get(SyncToken.SYNC_TOKEN_HEADER, "")
if sync_token_header == "":
if not sync_token_header:
return SyncToken()
# On the first sync from a Kobo device, we may receive the SyncToken
@@ -103,7 +103,7 @@ class SyncToken():
data_json = sync_token_json["data"]
validate(sync_token_json, SyncToken.data_schema_v1)
except (exceptions.ValidationError, ValueError) as e:
except (exceptions.ValidationError, ValueError):
log.error("Sync token contents do not follow the expected json schema.")
return SyncToken()