summaryrefslogtreecommitdiffstats
path: root/storage/formats
diff options
context:
space:
mode:
authorAles Kozumplik <akozumpl@redhat.com>2010-05-20 16:47:11 +0200
committerAles Kozumplik <akozumpl@redhat.com>2010-05-24 15:13:24 +0200
commite7b58597defe1a7d49e276b00b4c22381aa62baa (patch)
treef079b6de94590209bee586bd528eb0d308ca00cf /storage/formats
parentf26db0abd656bbdd54bb1b4bebbf1e69f032901f (diff)
downloadanaconda-e7b58597defe1a7d49e276b00b4c22381aa62baa.tar.gz
anaconda-e7b58597defe1a7d49e276b00b4c22381aa62baa.tar.xz
anaconda-e7b58597defe1a7d49e276b00b4c22381aa62baa.zip
iutil: execWithCallback() and execWithPulseProgress() return an object.
The object contains all the products of the exec: return call, stdout and stderr. The remaining execWith*() methods can migrate to this too one day. The advantage now is that lvm() and mdadm() in devicelibs/ don't have to resort to (possibly broken) hacks to get the error message from their calls.
Diffstat (limited to 'storage/formats')
-rw-r--r--storage/formats/fs.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 737747144..7c0b19bea 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -357,18 +357,18 @@ class FS(DeviceFormat):
100, pulse = True)
try:
- rc = iutil.execWithPulseProgress(self.mkfsProg,
- argv,
- stdout="/dev/tty5",
- stderr="/dev/tty5",
- progress=w)
+ ret = iutil.execWithPulseProgress(self.mkfsProg,
+ argv,
+ stdout="/dev/tty5",
+ stderr="/dev/tty5",
+ progress=w)
except Exception as e:
raise FormatCreateError(e, self.device)
finally:
if w:
w.pop()
- if rc:
+ if ret.rc:
raise FormatCreateError("format failed: %s" % rc, self.device)
self.exists = True
@@ -466,7 +466,7 @@ class FS(DeviceFormat):
100, pulse = True)
try:
- rc = iutil.execWithPulseProgress(self.resizefsProg,
+ ret = iutil.execWithPulseProgress(self.resizefsProg,
self.resizeArgs,
stdout="/dev/tty5",
stderr="/dev/tty5",
@@ -477,7 +477,7 @@ class FS(DeviceFormat):
if w:
w.pop()
- if rc:
+ if ret.rc:
raise FSResizeError("resize failed: %s" % rc, self.device)
self.doCheck(intf=intf)
@@ -516,7 +516,7 @@ class FS(DeviceFormat):
100, pulse = True)
try:
- rc = iutil.execWithPulseProgress(self.fsckProg,
+ ret = iutil.execWithPulseProgress(self.fsckProg,
self._getCheckArgs(),
stdout="/dev/tty5",
stderr="/dev/tty5",
@@ -527,11 +527,11 @@ class FS(DeviceFormat):
if w:
w.pop()
- if self._fsckFailed(rc):
+ if self._fsckFailed(ret.rc):
hdr = _("%(type)s filesystem check failure on %(device)s: ") % \
{"type": self.type, "device": self.device}
- msg = self._fsckErrorMessage(rc)
+ msg = self._fsckErrorMessage(ret.rc)
if intf:
help = _("Errors like this usually mean there is a problem "