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