Basic Metadata mechanism in python

This commit is contained in:
Ozzie Isaacs
2021-07-05 18:55:54 +02:00
parent 430ccd9ab1
commit 94da61c57e
5 changed files with 149 additions and 4 deletions
+7 -4
View File
@@ -205,10 +205,13 @@ class CalibreTask:
# By default, we're good to clean a task if it's "Done"
return self.stat in (STAT_FINISH_SUCCESS, STAT_FAIL)
@progress.setter
def progress(self, x):
# todo: throw error if outside of [0,1]
self._progress = x
'''@progress.setter
def progress(self, x):
if x > 1:
x = 1
if x < 0:
x = 0
self._progress = x'''
def _handleError(self, error_message):
self.stat = STAT_FAIL