From: David Stainton Date: Mon, 7 Dec 2015 20:54:59 +0000 (+0200) Subject: Remove magic-folder exclude stat X-Git-Url: https://git.rkrishnan.org/vdrive/components/%22news.html/configuration.txt?a=commitdiff_plain;h=7dc56c63ea1c4d6249c5fdf03d2e30007b9a36a6;p=tahoe-lafs%2Ftahoe-lafs.git Remove magic-folder exclude stat --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 55eb4701..62e6988d 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -669,7 +669,6 @@ class Downloader(QueueMixin, WriteFileMixin): self._deque.append( (relpath_u, file_node, metadata) ) else: self._log("Excluding %r" % (relpath_u,)) - self._count('objects_excluded') self._call_hook(None, 'processed') self._log("deque after = %r" % (self._deque,)) diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index ab6b1ef0..ede36e18 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -855,7 +855,6 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual def Alice_tries_to_p0wn_Bob(ign): print "Alice tries to p0wn Bob\n" - self.objects_excluded = self._get_count('downloader.objects_excluded', client=self.bob_magicfolder._client) processed_d = self.bob_magicfolder.downloader.set_hook('processed') # upload a file that would provoke the security bug from #2506 @@ -870,7 +869,6 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual d.addCallback(lambda ign: self.failIf(os.path.exists(path_u))) d.addCallback(lambda ign: self._check_version_in_local_db(self.bob_magicfolder, encoded_path_u, None)) - d.addCallback(lambda ign: self._check_downloader_count('objects_excluded', self.objects_excluded+1)) d.addCallback(lambda ign: self._check_downloader_count('objects_downloaded', 3)) d.addCallback(lambda ign: self._check_downloader_count('objects_conflicted', 0, magic=self.alice_magicfolder)) d.addCallback(lambda ign: self._check_downloader_count('objects_conflicted', 0)) @@ -915,8 +913,6 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual return d2 d.addCallback(lambda ign: Alice_conflicts_with_Bobs_last_downloaded_uri()) - # XXX fix the code so that it doesn't increment objects_excluded each turn - #d.addCallback(lambda ign: self._check_downloader_count('objects_excluded', 1)) d.addCallback(lambda ign: self._check_downloader_count('objects_downloaded', 4)) d.addCallback(lambda ign: self._check_downloader_count('objects_conflicted', 1)) d.addCallback(lambda ign: self._check_downloader_count('objects_downloaded', 1, magic=self.alice_magicfolder))