Revision 20777413 lib/mcpu.py

b/lib/mcpu.py
113 113
    h_results = hm.RunPhase(constants.HOOKS_PHASE_PRE)
114 114
    lu.HooksCallBack(constants.HOOKS_PHASE_PRE, h_results,
115 115
                     self._feedback_fn, None)
116

  
117
    if getattr(lu.op, "dry_run", False):
118
      # in this mode, no post-hooks are run, and the config is not
119
      # written (as it might have been modified by another LU, and we
120
      # shouldn't do writeout on behalf of other threads
121
      self.LogInfo("dry-run mode requested, not actually executing"
122
                   " the operation")
123
      return lu.dry_run_result
124

  
116 125
    try:
117 126
      result = lu.Exec(self._feedback_fn)
118 127
      h_results = hm.RunPhase(constants.HOOKS_PHASE_POST)

Also available in: Unified diff