Ran black on sources

This commit is contained in:
Griatch 2020-01-28 20:18:19 +01:00
parent 3a2176aa26
commit b4e7007e36
2 changed files with 5 additions and 2 deletions

View file

@ -507,7 +507,8 @@ Command {self} has no defined `func()` - showing on-command variables:
"""
if self.session:
return self.session.protocol_flags.get(
"SCREENWIDTH", {0: settings.CLIENT_DEFAULT_WIDTH})[0]
"SCREENWIDTH", {0: settings.CLIENT_DEFAULT_WIDTH}
)[0]
return settings.CLIENT_DEFAULT_WIDTH
def styled_table(self, *args, **kwargs):

View file

@ -64,7 +64,9 @@ class SharedLoginMiddleware(object):
if csession.get("webclient_authenticated_uid", None):
# set a nonce to prevent the webclient from erasing the webclient_authenticated_uid value
csession["webclient_authenticated_nonce"] = csession.get("webclient_authenticated_nonce", 0) + 1
csession["webclient_authenticated_nonce"] = (
csession.get("webclient_authenticated_nonce", 0) + 1
)
# wrap around to prevent integer overflows
if csession["webclient_authenticated_nonce"] > 32:
csession["webclient_authenticated_nonce"] = 0