use property setter

This commit is contained in:
2021-05-08 13:30:49 +08:00
parent 8844835c8d
commit 957cd3d923
2 changed files with 6 additions and 1 deletions

View File

@@ -127,6 +127,11 @@ class commandline:
def rebuildHashlist(self):
return self._rebuildHashlist
@rebuildHashlist.setter
def rebuildHashlist(self, v):
if isinstance(v, bool):
self._rebuildHashlist = v
@property
def exitAfterRebuild(self):
return self._exitAfterRebuild

View File

@@ -67,7 +67,7 @@ class RSSCheckerThread(Thread):
self._main._db.setRSSForceUpdate(rss.url, False)
if self._main._commandLine.rebuildHashlist and self._main._commandLine.exitAfterRebuild:
_exit(0)
self._main._commandLine._rebuildHashlist = False
self._main._commandLine.rebuildHashlist = False
self._main._tempFileEntries.clear()
def __init__(self, m):