mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-21 00:22:55 +00:00
play nice with subclasses
This commit is contained in:
@ -248,8 +248,12 @@ class ShareCrawler(service.MultiService):
|
|||||||
last_complete_prefix = self.prefixes[lcpi]
|
last_complete_prefix = self.prefixes[lcpi]
|
||||||
self.state["last-complete-prefix"] = last_complete_prefix
|
self.state["last-complete-prefix"] = last_complete_prefix
|
||||||
tmpfile = self.statefile + ".tmp"
|
tmpfile = self.statefile + ".tmp"
|
||||||
|
|
||||||
|
# Note: we use self.get_state() here because e.g
|
||||||
|
# LeaseCheckingCrawler stores non-JSON-able state in
|
||||||
|
# self.state() but converts it in self.get_state()
|
||||||
with open(tmpfile, "wb") as f:
|
with open(tmpfile, "wb") as f:
|
||||||
json.dump(self.state, f)
|
json.dump(self.get_state(), f)
|
||||||
fileutil.move_into_place(tmpfile, self.statefile)
|
fileutil.move_into_place(tmpfile, self.statefile)
|
||||||
|
|
||||||
def startService(self):
|
def startService(self):
|
||||||
|
Reference in New Issue
Block a user