From c7b7ecd315043f172b23cb50fd99916123eb859d Mon Sep 17 00:00:00 2001 From: parmentelat Date: Thu, 20 Dec 2018 12:31:52 +0100 Subject: [PATCH 1/1] cosmetic pep8-like --- PLC/Methods/GetSession.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PLC/Methods/GetSession.py b/PLC/Methods/GetSession.py index 1e05765..8ae8dd1 100644 --- a/PLC/Methods/GetSession.py +++ b/PLC/Methods/GetSession.py @@ -12,13 +12,13 @@ class GetSession(Method): Returns a new session key if a user or node authenticated successfully, faults otherwise. - Default value for 'expires' is 24 hours. Otherwise, the returned + Default value for 'expires' is 24 hours. Otherwise, the returned session 'expires' in the given number of seconds. """ roles = ['admin', 'pi', 'user', 'tech', 'node'] accepts = [Auth(), - Parameter(int,"expires", nullok=True)] + Parameter(int, "expires", nullok=True)] returns = Session.fields['session_id'] @@ -36,11 +36,11 @@ class GetSession(Method): else: session['expires'] = int(time.time()) + int(expires) - session.sync(commit = False) + session.sync(commit=False) if isinstance(self.caller, Node): - session.add_node(self.caller, commit = True) + session.add_node(self.caller, commit=True) elif isinstance(self.caller, Person): - session.add_person(self.caller, commit = True) + session.add_person(self.caller, commit=True) return session['session_id'] -- 2.43.0