diff options
author | Andy Grover <agrover@redhat.com> | 2014-11-26 10:47:10 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-11-26 10:47:10 -0800 |
commit | 0577370b43e8dfea3c8d07b99472ddf610fa8f9f (patch) | |
tree | cca11489e0b289d59711387514d887e5a8c77307 | |
parent | aa1cb2d5e5852e4a2bc63b66cc8aee18ae062c92 (diff) | |
download | rtslib-fb-0577370b43e8dfea3c8d07b99472ddf610fa8f9f.tar.gz |
Improve some exception messages
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/fabric.py | 4 | ||||
-rw-r--r-- | rtslib/tcm.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/rtslib/fabric.py b/rtslib/fabric.py index cb9b5b9..7eec479 100644 --- a/rtslib/fabric.py +++ b/rtslib/fabric.py @@ -214,8 +214,8 @@ class _BaseFabricModule(CFSNode): def _assert_feature(self, feature): if not self.has_feature(feature): - raise RTSLibError("This fabric module does not implement " - + "the %s feature" % feature) + raise RTSLibError("Fabric module %s does not implement " + + "the %s feature" % (self.name, feature)) def clear_discovery_auth_settings(self): self._check_self() diff --git a/rtslib/tcm.py b/rtslib/tcm.py index 70b0a7f..e30c193 100644 --- a/rtslib/tcm.py +++ b/rtslib/tcm.py @@ -676,7 +676,7 @@ class BlockStorageObject(StorageObject): def _configure(self, dev, wwn, readonly): self._check_self() if get_blockdev_type(dev) != 0: - raise RTSLibError("Device is not a TYPE_DISK block device") + raise RTSLibError("Device %s is not a TYPE_DISK block device" % dev) if is_dev_in_use(dev): raise RTSLibError("Cannot configure StorageObject because " + "device %s is already in use" % dev) |