self.sd_utils.modify_sd_on_dn(self.base_dn, self.desc_sddl)
try:
self.ldb_admin.deletegroup("testgroup")
- except:
+ except Exception:
pass
#def test_dirsync_errors(self):
samba.xattr_native.wrap_setxattr(tgt,
xattr.XATTR_NTACL_NAME,
attribute)
- except:
+ except Exception:
noxattr = 1
attribute = samba.xattr_native.wrap_getxattr(ref,
"system.posix_acl_access")
samba.xattr_native.wrap_setxattr(tgt,
"system.posix_acl_access",
attribute)
- except:
+ except Exception:
continue
for name in dirs:
subdir=root[len(dir):]
samba.xattr_native.wrap_setxattr(tgt,
xattr.XATTR_NTACL_NAME,
attribute)
- except:
+ except Exception:
noxattr = 1
attribute = samba.xattr_native.wrap_getxattr(ref,
"system.posix_acl_access")
"system.posix_acl_access",
attribute)
- except:
+ except Exception:
continue
if len(args) >= 7:
try:
attid = int(args[4], 16)
- except:
+ except Exception:
attid = int(args[4])
attname = args[5]
attmode = args[6]
assert store_dn == dn
#print "%s" % ndr_print(store_hwm)
#print "%s" % ndr_print(store_utdv)
- except:
+ except Exception:
store_dn = dn
store_hwm = drsuapi.DsReplicaHighWaterMark()
store_hwm.tmp_highest_usn = 0
cleartext_unicode = unicode(cleartext_utf16, 'utf-16-le')
cleartext_utf8 = cleartext_unicode.encode('utf-8')
gls.add_attr(obj.identifier.dn, clear_utf8_name, [cleartext_utf8])
- except:
+ except Exception:
pass
if attvals is not None:
ctx.destination_dsa_guid = destination_dsa_guid
print "Committing SAM database"
- except:
+ except Exception:
ctx.local_samdb.transaction_cancel()
raise
else:
else:
error_count = chk.check_database(DN=DN, scope=search_scope,
controls=controls, attrs=attrs)
- except:
+ except Exception:
if started_transaction:
samdb.transaction_cancel()
raise
samba.ntacls.setntacl(lp, tmpfile.name,
"O:S-1-5-32G:S-1-5-32", "S-1-5-32", "native")
eadb = False
- except:
+ except Exception:
# FIXME: Don't catch all exceptions here
logger.info("You are not root or your system do not support xattr, using tdb backend for attributes. "
"If you intend to use this provision in production, rerun the script as root on a system supporting xattrs.")
"DOMAINSID" : str(domainsid),
"DESCRIPTOR" : descr})
setup_add_ldif(dom_ldb, setup_path("provision_basedn_options.ldif"), None)
- except:
+ except Exception:
logger.error("Failed to setup database for BIND, AD based DNS cannot be used")
raise
del partfile[domaindn]
tdb_copy(logger,
os.path.join(private_dir, pfile),
os.path.join(dns_dir, pfile))
- except:
+ except Exception:
logger.error("Failed to setup database for BIND, AD based DNS cannot be used")
raise
print "ERROR: Failed to instantiate %s.%s" % (typename, n)
self.errcount += 1
continue
- except:
+ except Exception:
print "ERROR: Failed to instantiate %s.%s" % (typename, n)
self.errcount += 1
continue
samba.ntacls.setntacl(lp, file.name,
"O:S-1-5-32G:S-1-5-32", "S-1-5-32", "native")
eadb = False
- except:
+ except Exception:
logger.info("You are not root or your system do not support xattr, using tdb backend for attributes. "
"If you intend to use this provision in production, rerun the script as root on a system supporting xattrs.")
file.close()