]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
More fixes.
authorDaira Hopwood <daira@jacaranda.org>
Mon, 18 May 2015 23:38:28 +0000 (00:38 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 29 May 2015 20:42:59 +0000 (21:42 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/drop_upload.py
src/allmydata/windows/inotify.py

index 4dc59798f05701eef08f06cf023432732750c9d2..3f2c7aad3840cd781fcfa8fcc27caf1f489ed4bc 100644 (file)
@@ -202,7 +202,7 @@ class DropUploader(service.MultiService):
             def _failed(f):
                 self._log("failed to create subdirectory %r due to %r" % (path, f))
                 self._stats_provider.count('drop_upload.objects_failed', 1)
-            d2.addCallback(_failed)
+            d2.addErrback(_failed)
             d2.addCallback(lambda ign: self._scan(path))
             return d2
 
index 87e05b66a8109b6d3312597d4b386db1b3c99b03..887c63848676d820cbcb9614e44117677098d6d4 100644 (file)
@@ -280,7 +280,6 @@ class FileNotifier(object):
                 log.err(e)
             else:
                 s = Notification(self._read_dword(data, pos+4), path_u)
-                print s
                 yield s
 
             next_entry_offset = self._read_dword(data, pos)
@@ -382,13 +381,13 @@ class INotify(PollMixin):
             # <http://twistedmatrix.com/documents/current/core/howto/threading.html>.
 
             while True:
-                # We must set _started to True *after* calling read_notifications, so that
+                # We must callback self._started_d *after* calling read_notifications, so that
                 # the caller of startReading() can tell when we've actually started reading.
 
                 self._notifier.read_notifications()
                 if not started:
-                    reactor.callFromThread(self._started_d.callback, None)
                     started = True
+                    reactor.callFromThread(self._started_d.callback, None)
 
                 for info in self._notifier.get_notifications():
                     print info