From 734e7a241e1b6d3b8962da8acc7f2799c35fdf75 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Sat, 19 Sep 2020 21:47:01 +1200 Subject: [PATCH] Fix import error in Python3 --- libs/custom/syno/auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/custom/syno/auth.py b/libs/custom/syno/auth.py index ef8d2f8e..fb3a4927 100644 --- a/libs/custom/syno/auth.py +++ b/libs/custom/syno/auth.py @@ -97,7 +97,7 @@ class Authentication: req_param['_sid'] = self._sid - if method is 'get': + if method == 'get': url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name response = requests.get(url, req_param) @@ -106,7 +106,7 @@ class Authentication: else: return response - elif method is 'post': + elif method == 'post': url = ('%s%s' % (self._base_url, api_path)) + '?api=' + api_name response = requests.post(url, req_param) @@ -121,4 +121,4 @@ class Authentication: @property def base_url(self): - return self._base_url \ No newline at end of file + return self._base_url