diff options
author | Andy Grover <agrover@redhat.com> | 2014-11-13 11:07:25 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-11-13 11:07:25 -0800 |
commit | 236bef5f486f83d195068508046c05871d7c3112 (patch) | |
tree | 3914e3e523bd0f65618cab80265722c76582a050 | |
parent | e50cb7efec3acaeedd17ae11646cd8d3e2fee191 (diff) | |
download | rtslib-fb-236bef5f486f83d195068508046c05871d7c3112.tar.gz |
Improve catching of exceptions when creating storage objects
Catch all exceptions, and include their message in err_func.
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/root.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rtslib/root.py b/rtslib/root.py index 92f3396..0b50723 100644 --- a/rtslib/root.py +++ b/rtslib/root.py @@ -187,8 +187,8 @@ class RTSRoot(CFSNode): dict_remove(kwargs, ('exists', 'attributes', 'plugin', 'buffered_mode')) try: so_obj = so_cls(**kwargs) - except (TypeError, ValueError): - err_func("Could not create StorageObject %s" % so['name']) + except Exception as e: + err_func("Could not create StorageObject %s: %s" % (so['name'], e)) continue # Custom err func to include block name |