diff options
| -rw-r--r-- | bitbake/lib/pyinotify.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bitbake/lib/pyinotify.py b/bitbake/lib/pyinotify.py index 6ae40a2d76..8c94b3e334 100644 --- a/bitbake/lib/pyinotify.py +++ b/bitbake/lib/pyinotify.py | |||
| @@ -52,7 +52,6 @@ from collections import deque | |||
| 52 | from datetime import datetime, timedelta | 52 | from datetime import datetime, timedelta |
| 53 | import time | 53 | import time |
| 54 | import re | 54 | import re |
| 55 | import asyncore | ||
| 56 | import glob | 55 | import glob |
| 57 | import locale | 56 | import locale |
| 58 | import subprocess | 57 | import subprocess |
| @@ -1475,35 +1474,6 @@ class ThreadedNotifier(threading.Thread, Notifier): | |||
| 1475 | self.loop() | 1474 | self.loop() |
| 1476 | 1475 | ||
| 1477 | 1476 | ||
| 1478 | class AsyncNotifier(asyncore.file_dispatcher, Notifier): | ||
| 1479 | """ | ||
| 1480 | This notifier inherits from asyncore.file_dispatcher in order to be able to | ||
| 1481 | use pyinotify along with the asyncore framework. | ||
| 1482 | |||
| 1483 | """ | ||
| 1484 | def __init__(self, watch_manager, default_proc_fun=None, read_freq=0, | ||
| 1485 | threshold=0, timeout=None, channel_map=None): | ||
| 1486 | """ | ||
| 1487 | Initializes the async notifier. The only additional parameter is | ||
| 1488 | 'channel_map' which is the optional asyncore private map. See | ||
| 1489 | Notifier class for the meaning of the others parameters. | ||
| 1490 | |||
| 1491 | """ | ||
| 1492 | Notifier.__init__(self, watch_manager, default_proc_fun, read_freq, | ||
| 1493 | threshold, timeout) | ||
| 1494 | asyncore.file_dispatcher.__init__(self, self._fd, channel_map) | ||
| 1495 | |||
| 1496 | def handle_read(self): | ||
| 1497 | """ | ||
| 1498 | When asyncore tells us we can read from the fd, we proceed processing | ||
| 1499 | events. This method can be overridden for handling a notification | ||
| 1500 | differently. | ||
| 1501 | |||
| 1502 | """ | ||
| 1503 | self.read_events() | ||
| 1504 | self.process_events() | ||
| 1505 | |||
| 1506 | |||
| 1507 | class TornadoAsyncNotifier(Notifier): | 1477 | class TornadoAsyncNotifier(Notifier): |
| 1508 | """ | 1478 | """ |
| 1509 | Tornado ioloop adapter. | 1479 | Tornado ioloop adapter. |
