From 333411a7b114737ebd613d1dece08f78d7ca7f37 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 15 May 2008 09:00:01 +0000 Subject: [PATCH] Split drbd command creation and execution Make _AssembleDisk more similar to _AssembleNet by splitting the generation of the drbdsetup command and its execution. While not changing anything this makes it easier to manipulate the command just in certain cases, which in the future we'll need to do. Reviewed-by: iustinp --- lib/bdev.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bdev.py b/lib/bdev.py index e328544a5..eefbc06ab 100644 --- a/lib/bdev.py +++ b/lib/bdev.py @@ -1806,9 +1806,9 @@ class DRBD8(BaseDRBD): """ if not cls._IsValidMeta(meta): return False - result = utils.RunCmd(["drbdsetup", cls._DevPath(minor), "disk", - backend, meta, "0", "-e", "detach", - "--create-device"]) + args = ["drbdsetup", cls._DevPath(minor), "disk", + backend, meta, "0", "-e", "detach", "--create-device"] + result = utils.RunCmd(args) if result.failed: logger.Error("Can't attach local disk: %s" % result.output) return not result.failed -- GitLab