On 06/29/2011 05:57 PM, Chris Lumens wrote:
+
+ def hardwareError(self, exception):
+ text=_("The installation was stopped due to what seems to be a problem "
+ "with your hardware, the exact error message is:\n\n%s.\n\n "
+ "The installer will now terminate.") % str(exception)
Little grammar nitpick here. The first sentence should be broken up
into two, as follows:
"The installation was stopped due to what seems to be a problem with
your hardware. The exact error message is:"
Fixed.
+ def __init__(self, *args, **kwargs):
+ hardware_fault = kwargs.pop("hardware_fault", False)
+ super(StorageError, self).__init__(*args, **kwargs)
+ self.hardware_fault = hardware_fault
# Device
class DeviceError(StorageError):
Another little nitpick. Is there a problem with keeping hardware_fault
in the kwargs when you call the superclass's __init__? Alternately, is
Exception won't take it:
>>> Exception(hardware_fault=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: exceptions.Exception does not take keyword arguments
there a problem with setting self.hardware_fault before you call the
same?
I fixed this. The C++ guy in me just tries to call the constructor of
the superclass as soon as possible, but it doesn't matter and looks
better the other way here.
Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list