[PATCH] Documentation: add exception capture function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add exception capture function

Signed-off-by: shijm <junming@xxxxxxxxxxxx>
---
 Documentation/target/tcm_mod_builder.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index 54492aa813b9..5b28d50ed80f 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -29,8 +29,9 @@ def tcm_mod_create_module_subdir(fabric_mod_dir_var):
 		return 1
 
 	print "Creating fabric_mod_dir: " + fabric_mod_dir_var
-	ret = os.mkdir(fabric_mod_dir_var)
-	if ret:
+    try:
+	    ret = os.mkdir(fabric_mod_dir_var)
+	except:
 		tcm_mod_err("Unable to mkdir " + fabric_mod_dir_var)
 
 	return
-- 
2.18.2




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux