error fix

Fix error where get_dir_status was not returning the correct value
This commit is contained in:
Renato Visaggio
2021-06-10 11:36:51 +02:00
parent e043944a61
commit 049ab3edc8
2 changed files with 2 additions and 4 deletions

View File

@ -8,7 +8,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
setup(
name='synology-api',
version='0.2.1',
version='0.2.2',
packages=find_packages(exclude=['tests*']),
license='MIT',
description='Python Synology API Wrapper',

View File

@ -406,9 +406,7 @@ class FileStation:
req_param = {'version': info['maxVersion'], 'method': 'status', 'taskid': taskid}
if taskid is None and self._dir_taskid is not '':
req_param['taskid'] = self._dir_taskid
else:
return 'Did you run start_dir_size_calc() first? No task id found!' + str(self._dir_taskid_list)
return 'Choose a taskid from this list: ' + str(self._dir_taskid)
return self.request_data(api_name, api_path, req_param)