Revision b459a848 lib/watcher/__init__.py

b/lib/watcher/__init__.py
50 50
from ganeti import ssconf
51 51
from ganeti import ht
52 52

  
53
import ganeti.rapi.client # pylint: disable-msg=W0611
53
import ganeti.rapi.client # pylint: disable=W0611
54 54

  
55 55
from ganeti.watcher import nodemaint
56 56
from ganeti.watcher import state
......
106 106

  
107 107
  try:
108 108
    results = utils.RunParts(hooks_dir)
109
  except Exception: # pylint: disable-msg=W0703
109
  except Exception: # pylint: disable=W0703
110 110
    logging.exception("RunParts %s failed: %s", hooks_dir)
111 111
    return
112 112

  
......
193 193
        logging.info("Restarting instance '%s' (attempt #%s)",
194 194
                     inst.name, n + 1)
195 195
        inst.Restart(cl)
196
      except Exception: # pylint: disable-msg=W0703
196
      except Exception: # pylint: disable=W0703
197 197
        logging.exception("Error while restarting instance '%s'", inst.name)
198 198
      else:
199 199
        started.add(inst.name)
......
255 255
        try:
256 256
          logging.info("Activating disks for instance '%s'", inst.name)
257 257
          inst.ActivateDisks(cl)
258
        except Exception: # pylint: disable-msg=W0703
258
        except Exception: # pylint: disable=W0703
259 259
          logging.exception("Error while activating disks for instance '%s'",
260 260
                            inst.name)
261 261

  
......
313 313

  
314 314
    try:
315 315
      cli.PollJob(job_id, cl=cl, feedback_fn=logging.debug)
316
    except Exception: # pylint: disable-msg=W0703
316
    except Exception: # pylint: disable=W0703
317 317
      logging.exception("Error while activating disks")
318 318

  
319 319

  
......
549 549
    try:
550 550
      # TODO: Should utils.StartDaemon be used instead?
551 551
      pid = os.spawnv(os.P_NOWAIT, args[0], args)
552
    except Exception: # pylint: disable-msg=W0703
552
    except Exception: # pylint: disable=W0703
553 553
      logging.exception("Failed to start child for group '%s' (%s)",
554 554
                        name, uuid)
555 555
    else:
......
596 596

  
597 597
  # Run node maintenance in all cases, even if master, so that old masters can
598 598
  # be properly cleaned up
599
  if nodemaint.NodeMaintenance.ShouldRun(): # pylint: disable-msg=E0602
600
    nodemaint.NodeMaintenance().Exec() # pylint: disable-msg=E0602
599
  if nodemaint.NodeMaintenance.ShouldRun(): # pylint: disable=E0602
600
    nodemaint.NodeMaintenance().Exec() # pylint: disable=E0602
601 601

  
602 602
  try:
603 603
    client = GetLuxiClient(True)
......
729 729
  logging.debug("Using state file %s", state_path)
730 730

  
731 731
  # Global watcher
732
  statefile = state.OpenStateFile(state_path) # pylint: disable-msg=E0602
732
  statefile = state.OpenStateFile(state_path) # pylint: disable=E0602
733 733
  if not statefile:
734 734
    return constants.EXIT_FAILURE
735 735

  
736
  notepad = state.WatcherState(statefile) # pylint: disable-msg=E0602
736
  notepad = state.WatcherState(statefile) # pylint: disable=E0602
737 737
  try:
738 738
    # Connect to master daemon
739 739
    client = GetLuxiClient(False)

Also available in: Unified diff