[Meego-distribution-tools] [MIC2][COMMIT] Improve error messages.
Yi Yang
yi.y.yang at intel.com
Wed Dec 1 01:05:17 PST 2010
commit c9f3fc34734b6916d0cc8b08728bc052890e438c
Author: Marko Saukko <marko.saukko at cybercom.com>
Date: Fri Nov 26 11:55:05 2010 +0200
Improve error messages.
diff --git a/mic/imgcreate/fs.py b/mic/imgcreate/fs.py
index fc17b7d..f2e6a96 100644
--- a/mic/imgcreate/fs.py
+++ b/mic/imgcreate/fs.py
@@ -521,7 +521,7 @@ class ExtDiskMount(DiskMount):
self.disk.device])
# str(self.disk.size / self.blocksize)])
if rc != 0:
- raise MountError("Error creating %s filesystem" % (self.fstype,))
+ raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))
dev_null = os.open("/dev/null", os.O_WRONLY)
try:
@@ -627,7 +627,7 @@ class VfatDiskMount(DiskMount):
blah = [self.mkfscmd, "-n", self.fslabel, "-i", self.uuid, self.disk.device]
rc = subprocess.call(blah)
if rc != 0:
- raise MountError("Error creating %s filesystem" % (self.fstype,))
+ raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))
logging.debug("Tuning filesystem on %s" % self.disk.device)
def __resize_filesystem(self, size = None):
@@ -729,7 +729,7 @@ class BtrfsDiskMount(DiskMount):
logging.debug("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
rc = subprocess.call([self.mkfscmd, "-L", self.fslabel, self.disk.device])
if rc != 0:
- raise MountError("Error creating %s filesystem" % (self.fstype,))
+ raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))
dev_null = os.open("/dev/null", os.O_WRONLY)
try:
More information about the MeeGo-distribution-tools
mailing list