diff options
Diffstat (limited to 'glustolibs-io/shared_files/scripts/file_dir_ops.py')
-rwxr-xr-x | glustolibs-io/shared_files/scripts/file_dir_ops.py | 4 |
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 |