Change BlockDev.Remove() failure result
authorIustin Pop <iustin@google.com>
Tue, 10 Feb 2009 14:44:41 +0000 (14:44 +0000)
committerIustin Pop <iustin@google.com>
Tue, 10 Feb 2009 14:44:41 +0000 (14:44 +0000)
commit0c6c04ec81af4ff0f0fb804042d02aac611e0d72
tree4aab27ce93b52f59015a1c37cda4e349ab7d8835
parente1bc0878fcfeb85973f6701830a641ca4e905934
Change BlockDev.Remove() failure result

Currently, the Remove() methods of block devices return True/False.
This doesn't permit any error detail reporting.

This patch changes the return type to None for success, and raises
BlockDeviceError in case of failure. This permits the details to be
passed up the stack.

The patch also simplifies a little the Remove method of file-based
devices (no stat first, just try unlink).

Reviewed-by: ultrotter
lib/backend.py
lib/bdev.py