From: david-sarah Date: Wed, 10 Aug 2011 03:03:45 +0000 (-0700) Subject: drop-upload: rename 'start' method to 'startService', which is what you're supposed... X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/rgr-080307.php?a=commitdiff_plain;h=10ee22f50e5bdfd329dea3a33982b6f451bfeb4b;p=tahoe-lafs%2Ftahoe-lafs.git drop-upload: rename 'start' method to 'startService', which is what you're supposed to use to start a Service. refs #1429 --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 7713b4fe..d007b8b1 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -432,7 +432,7 @@ class Client(node.Node, pollmixin.PollMixin): from allmydata.frontends import drop_upload s = drop_upload.DropUploader(self, upload_dircap, local_dir_utf8) s.setServiceParent(self) - s.start() + s.startService() except Exception, e: self.log("couldn't start drop-uploader: %r", args=(e,)) else: diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index e8b1cdeb..b8d2a940 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -59,7 +59,8 @@ class DropUploader(service.MultiService): mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR self._notifier.watch(self._local_path, mask=mask, callbacks=[self._notify]) - def start(self): + def startService(self): + service.MultiService.startService(self) d = self._notifier.startReading() self._stats_provider.count('drop_upload.dirs_monitored', 1) return d diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index ea21ff02..30cbe1cb 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -69,7 +69,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin): self.upload_dircap = n.get_uri() self.uploader = DropUploader(self.client, self.upload_dircap, self.local_dir.encode('utf-8'), inotify=self.inotify) - return self.uploader.start() + return self.uploader.startService() d.addCallback(_made_upload_dir) # Write something short enough for a LIT file.