diff options
author | Andy Grover <agrover@redhat.com> | 2013-04-25 10:04:27 -0700 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2013-04-25 10:04:27 -0700 |
commit | 0ad62bdae0aa0d241d9a5829dbe80f6b778a1d79 (patch) | |
tree | c248110844fc2713931f44129b12ff8f606cbb9e | |
parent | 1421d684ba8990b79abc34dcac46f6f646b95a9b (diff) | |
download | rtslib-fb-0ad62bdae0aa0d241d9a5829dbe80f6b778a1d79.tar.gz |
Shorten some exception messages
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/tcm.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rtslib/tcm.py b/rtslib/tcm.py index 71c90ab..5dd39c8 100644 --- a/rtslib/tcm.py +++ b/rtslib/tcm.py @@ -513,12 +513,11 @@ class FileIOStorageObject(StorageObject): block_type = get_block_type(dev) if block_type is None: # a file if os.path.exists(os.path.realpath(dev)) and not os.path.isfile(dev): - raise RTSLibError("Device %s is neither a file, " % dev - + "a disk partition or a block device.") + raise RTSLibError("Path not to a file or block device.") if size is None: - raise RTSLibError("The size parameter is mandatory " - + "when using a file.") + raise RTSLibError("Path is to a file, size needed.") + self._control("fd_dev_name=%s,fd_dev_size=%d" % (dev, size)) else: # a block device |