s4:samba_kcc: Fix error handling opening export ldif file
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 21 Apr 2014 15:32:36 +0000 (17:32 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Tue, 22 Apr 2014 21:34:15 +0000 (23:34 +0200)
Change-Id: If52440272513ef244e33481476da0e884969153c
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
source4/scripting/bin/samba_kcc

index 6301e49b4f97f5ff6a3c09a09957089b950420b7..d752f45b5d55b21ab3cbbc1b455826dd42ba8999 100755 (executable)
@@ -2037,8 +2037,8 @@ class KCC(object):
 
         try:
             f = open(ldif_file, "w")
-        except (enum, estr):
-            logger.error("Unable to open (%s) : %s" % (ldif_file, estr))
+        except IOError as ioerr:
+            logger.error("Unable to open (%s) : %s" % (ldif_file, str(ioerr)))
             return 1
 
         try: