From 1da0c1c8608e3cc3a735b4db14931762ddaef033 Mon Sep 17 00:00:00 2001 From: Sebastien Martini Date: Mon, 22 Dec 2014 17:01:34 +0100 Subject: Remove extra lines, fix indents --- python2/pyinotify.py | 9 +++------ python3/pyinotify.py | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/python2/pyinotify.py b/python2/pyinotify.py index 13af04e..dd8f637 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -1381,7 +1381,6 @@ class Notifier: # Register unlink function atexit.register(lambda : os.unlink(pid_file)) - def _sleep(self, ref_time): # Only consider sleeping if read_freq is > 0 if self._read_freq > 0: @@ -1391,7 +1390,6 @@ class Notifier: log.debug('Now sleeping %d seconds', sleep_amount) time.sleep(sleep_amount) - def loop(self, callback=None, daemonize=False, **args): """ Events are read only one time every min(read_freq, timeout) @@ -1438,7 +1436,6 @@ class Notifier: # Close internals self.stop() - def stop(self): """ Close inotify's instance (close its file descriptor). @@ -1595,8 +1592,8 @@ class TornadoAsyncNotifier(Notifier): ioloop.add_handler(self._fd, self.handle_read, ioloop.READ) def stop(self): - self.io_loop.remove_handler(self._fd) - Notifier.stop(self) + self.io_loop.remove_handler(self._fd) + Notifier.stop(self) def handle_read(self, *args, **kwargs): """ @@ -1624,7 +1621,7 @@ class AsyncioNotifier(Notifier): @param loop: asyncio or trollius event loop instance. @type loop: asyncio.BaseEventLoop or trollius.BaseEventLoop instance. @param callback: Functor called at the end of each call to handle_read. - Expects to receive the notifier object (self) as + Expects to receive the notifier object (self) as single parameter. @type callback: callable object or function diff --git a/python3/pyinotify.py b/python3/pyinotify.py index 4f039f5..f4e76e5 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -1371,7 +1371,6 @@ class Notifier: # Register unlink function atexit.register(lambda : os.unlink(pid_file)) - def _sleep(self, ref_time): # Only consider sleeping if read_freq is > 0 if self._read_freq > 0: @@ -1381,7 +1380,6 @@ class Notifier: log.debug('Now sleeping %d seconds', sleep_amount) time.sleep(sleep_amount) - def loop(self, callback=None, daemonize=False, **args): """ Events are read only one time every min(read_freq, timeout) @@ -1428,7 +1426,6 @@ class Notifier: # Close internals self.stop() - def stop(self): """ Close inotify's instance (close its file descriptor). @@ -1585,8 +1582,8 @@ class TornadoAsyncNotifier(Notifier): ioloop.add_handler(self._fd, self.handle_read, ioloop.READ) def stop(self): - self.io_loop.remove_handler(self._fd) - Notifier.stop(self) + self.io_loop.remove_handler(self._fd) + Notifier.stop(self) def handle_read(self, *args, **kwargs): """ @@ -1614,7 +1611,7 @@ class AsyncioNotifier(Notifier): @param loop: asyncio or trollius event loop instance. @type loop: asyncio.BaseEventLoop or trollius.BaseEventLoop instance. @param callback: Functor called at the end of each call to handle_read. - Expects to receive the notifier object (self) as + Expects to receive the notifier object (self) as single parameter. @type callback: callable object or function -- cgit v1.2.1