From 945a8bbcaa261c52302490d0474e4bf7e5b26e59 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 11 Nov 2020 09:10:33 +0100 Subject: [PATCH] python: fix linting errors --- python/villas/node/node.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/villas/node/node.py b/python/villas/node/node.py index c052b549f..71be7bba1 100644 --- a/python/villas/node/node.py +++ b/python/villas/node/node.py @@ -89,7 +89,7 @@ class Node(object): cfg = i elif type(i) is str: cfg = json.loads(i) - elif hasattr(i, 'read'): # file-like? + elif hasattr(i, 'read'): # file-like? cfg = json.load(i) else: raise TypeError() @@ -97,16 +97,17 @@ class Node(object): req = { 'config': cfg } - + self.request('restart', method='POST', json=req) def request(self, action, method='GET', **args): - + if 'timeout' not in args: args['timeout'] = 1 r = requests.request(method, - f'{self.api_url}/api/{self.api_version}/{action}', **args) + f'{self.api_url}/api/{self.api_version}/{action}', + **args) r.raise_for_status() return r.json()