summaryrefslogtreecommitdiffstats
path: root/glustolibs-io/shared_files
diff options
context:
space:
mode:
authorShwethaHP <spandura@redhat.com>2017-11-23 02:53:52 +0530
committerShwethaHP <spandura@redhat.com>2017-11-23 02:54:59 +0530
commit84dda30153a2c392d01c4c812ebb2883cf739ea1 (patch)
treeda27a4d8e78fe391711bc90544c8f3959bd2d66f /glustolibs-io/shared_files
parentda9eff9516ffd132f26c11e4e48b167bc2c74beb (diff)
Fixing the glusto-tests Build Failures:
21:00:43 ./glustolibs-gluster/glustolibs/gluster/lib_utils.py:67:5: E722 do not use bare except' 21:00:43 ./glustolibs-gluster/glustolibs/gluster/lib_utils.py:290:5: E722 do not use bare except' 21:00:43 ./glustolibs-io/shared_files/scripts/file_dir_ops.py:308:13: E722 do not use bare except' 21:00:43 ./glustolibs-io/shared_files/scripts/file_dir_ops.py:316:13: E722 do not use bare except' Change-Id: Ia0babf3d5a10b19c48425e4fcbcb8e79eea5e391 Signed-off-by: ShwethaHP <spandura@redhat.com>
Diffstat (limited to 'glustolibs-io/shared_files')
-rwxr-xr-xglustolibs-io/shared_files/scripts/file_dir_ops.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/glustolibs-io/shared_files/scripts/file_dir_ops.py b/glustolibs-io/shared_files/scripts/file_dir_ops.py
index 8d5b8c488..5bcc422ef 100755
--- a/glustolibs-io/shared_files/scripts/file_dir_ops.py
+++ b/glustolibs-io/shared_files/scripts/file_dir_ops.py
@@ -305,7 +305,7 @@ def _create_files(dir_path, num_of_files, fixed_file_size=None,
for x in range(file_size)))
document.add_paragraph(file_str)
document.save(fname_abs_path)
- except:
+ except Exception as e:
print ("Unable to write to file '%s' : %s" %
(fname_abs_path, e.strerror))
rc = 1
@@ -313,7 +313,7 @@ def _create_files(dir_path, num_of_files, fixed_file_size=None,
try:
with open(fname_abs_path, "w+") as fd:
fd.close()
- except:
+ except IOError as e:
print ("Unable to write to file '%s' : %s" %
(fname_abs_path, e.strerror))
rc = 1