diff options
author | Andy Grover <agrover@redhat.com> | 2014-11-13 11:35:16 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-11-13 11:35:16 -0800 |
commit | a0118567c3400bd63dafd8881e3e552ddea381e7 (patch) | |
tree | db596fae591e6a87dd1f93814fb6cd6f7a59b74c /rtslib/utils.py | |
parent | 236bef5f486f83d195068508046c05871d7c3112 (diff) | |
download | rtslib-fb-a0118567c3400bd63dafd8881e3e552ddea381e7.tar.gz |
Standardize on no periods in exception messages
Do not terminate our exception messages with a period. This follows how
they are used in the Python stdlib.
Also remove some str() conversions where the "%s" in the format string
should already be doing the conversion.
Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'rtslib/utils.py')
-rw-r--r-- | rtslib/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rtslib/utils.py b/rtslib/utils.py index b2e74a8..713881e 100644 --- a/rtslib/utils.py +++ b/rtslib/utils.py @@ -245,7 +245,7 @@ def convert_scsi_hctl_to_path(host, controller, target, lun): lun = int(lun) except ValueError: raise RTSLibError( - "The host, controller, target and lun parameter must be integers.") + "The host, controller, target and lun parameter must be integers") for devname in os.listdir("/sys/block"): path = "/dev/%s" % devname @@ -285,7 +285,7 @@ def generate_wwn(wwn_type): elif wwn_type == 'eui': return "eui.001405" + uuid.uuid4().hex[-10:] else: - raise ValueError("Unknown WWN type: %s." % wwn_type) + raise ValueError("Unknown WWN type: %s" % wwn_type) def colonize(str): ''' @@ -378,7 +378,7 @@ def mount_configfs(): stderr=subprocess.PIPE) (stdoutdata, stderrdata) = process.communicate() if process.returncode != 0: - raise RTSLibError("Cannot mount configfs.") + raise RTSLibError("Cannot mount configfs") def dict_remove(d, items): for item in items: |