Revision 32b1efa1 lib/asyncnotifier.py

b/lib/asyncnotifier.py
133 133
    # by the callback by calling "enable" again on us.
134 134
    logging.debug("Received 'ignored' inotify event for %s", event.path)
135 135
    self.watch_handle = None
136

  
137
    try:
138
      self.callback(False)
139
    except: # pylint: disable-msg=W0702
140
      # we need to catch any exception here, log it, but proceed, because even
141
      # if we failed handling a single request, we still want our daemon to
142
      # proceed.
143
      logging.error("Unexpected exception", exc_info=True)
136
    self.callback(False)
144 137

  
145 138
  # pylint: disable-msg=C0103
146 139
  # this overrides a method in pyinotify.ProcessEvent
......
150 143
    # replacing any file with a new one, at filesystem level, rather than
151 144
    # actually changing it. (see utils.WriteFile)
152 145
    logging.debug("Received 'modify' inotify event for %s", event.path)
153

  
154
    try:
155
      self.callback(True)
156
    except: # pylint: disable-msg=W0702
157
      # we need to catch any exception here, log it, but proceed, because even
158
      # if we failed handling a single request, we still want our daemon to
159
      # proceed.
160
      logging.error("Unexpected exception", exc_info=True)
146
    self.callback(True)
161 147

  
162 148
  def process_default(self, event):
163 149
    logging.error("Received unhandled inotify event: %s", event)

Also available in: Unified diff