From a1b89c764bcb3c2b52ef03b46415403b331439bc Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 7 Jun 2005 19:21:23 +0000 Subject: 2005-06-07 Jeremy Katz * partitions.py (Partitions.writeKS): And use the quoted format so we get it everywhere (#159193) * fsset.py (FileSystemType.getName): Pass back quoted fsname if needed. --- partitions.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'partitions.py') diff --git a/partitions.py b/partitions.py index 3bc795955..dfde0f7f7 100644 --- a/partitions.py +++ b/partitions.py @@ -1035,12 +1035,8 @@ class Partitions: elif request.fstype.getName() == "Apple Bootstrap": args.extend(["appleboot", "--fstype", "\"Apple Bootstrap\""]) elif request.mountpoint: - fstype = request.fstype.getName() - if fstype.find(" ") > 0: - fstype = "\"%s\"" %(fstype,) - args.append(request.mountpoint) - args.append("--fstype") - args.append(fstype) + args.extend([request.mountpoint, "--fstype", + request.fstype.getName(quoted = 1)]) else: continue @@ -1106,11 +1102,7 @@ class Partitions: if not request.format: args.append("--noformat") if request.fstype: - fstype = request.fstype.getName() - if fstype.find(" ") > 0: - fstype = "\"%s\"" %(fstype,) - args.append("--fstype") - args.append(fstype) + args.extend(["--fstype", request.fstype.getName(quoted = 1)]) if request.badblocks: args.append("--badblocks") @@ -1176,8 +1168,7 @@ class Partitions: if not request.format: args.append("--noformat") if request.fstype: - args.append("--fstype") - args.append(request.fstype.getName()) + args.extend(["--fstype", request.fstype.getName(quoted = 1)]) vg = self.getRequestByID(request.volumeGroup) if vg is None: -- cgit