From 32974775ff52342e6938d84488f7fddf573e2f1d Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 19 Aug 2016 17:33:18 -0700 Subject: [PATCH] fix codechecks: trailing whitespace, suspicious variable captures --- src/allmydata/test/test_magic_folder.py | 2 +- src/allmydata/windows/inotify.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 6bd23c9c5..2f650fd25 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -456,7 +456,7 @@ class MagicFolderAliceBobTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, Rea yield iterate(self.alice_magicfolder) # for windows yield iterate(self.bob_magicfolder) # for windows - + # check the state (XXX I had to switch the versions to 0; is that really right? why?) yield self._check_version_in_dmd(self.alice_magicfolder, u"blam", 0) yield self._check_version_in_local_db(self.alice_magicfolder, u"blam", 0) diff --git a/src/allmydata/windows/inotify.py b/src/allmydata/windows/inotify.py index 7c57a8983..c8805cb64 100644 --- a/src/allmydata/windows/inotify.py +++ b/src/allmydata/windows/inotify.py @@ -281,18 +281,18 @@ class INotify(PollMixin): def _do_pending_calls(): self._pending_call = None - for path in self._pending: + for path1 in self._pending: if self._callbacks: for cb in self._callbacks: try: - cb(None, path, IN_CHANGED) - except Exception, e: - log.err(e) + cb(None, path1, IN_CHANGED) + except Exception, e2: + log.err(e2) self._pending = set() - def _maybe_notify(path): - if path not in self._pending: - self._pending.add(path) + def _maybe_notify(path2): + if path2 not in self._pending: + self._pending.add(path2) if self._state not in [STOPPING, STOPPED]: _do_pending_calls() # if self._pending_call is None and self._state not in [STOPPING, STOPPED]: