summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision8
-rwxr-xr-xsource4/scripting/devel/repl_cleartext_pwd.py6
-rw-r--r--source4/scripting/python/samba/join.py2
-rw-r--r--source4/scripting/python/samba/netcmd/dbcheck.py2
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py2
-rw-r--r--source4/scripting/python/samba/provision/sambadns.py4
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/testrpc.py2
7 files changed, 13 insertions, 13 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 738d6be891..aec0774a9d 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1488,14 +1488,14 @@ def copyxattrs(dir, refdir):
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):]
@@ -1511,7 +1511,7 @@ def copyxattrs(dir, refdir):
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")
@@ -1519,7 +1519,7 @@ def copyxattrs(dir, refdir):
"system.posix_acl_access",
attribute)
- except:
+ except Exception:
continue
diff --git a/source4/scripting/devel/repl_cleartext_pwd.py b/source4/scripting/devel/repl_cleartext_pwd.py
index 840d281a6e..5eebc8689d 100755
--- a/source4/scripting/devel/repl_cleartext_pwd.py
+++ b/source4/scripting/devel/repl_cleartext_pwd.py
@@ -101,7 +101,7 @@ if __name__ == "__main__":
if len(args) >= 7:
try:
attid = int(args[4], 16)
- except:
+ except Exception:
attid = int(args[4])
attname = args[5]
attmode = args[6]
@@ -145,7 +145,7 @@ if __name__ == "__main__":
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
@@ -325,7 +325,7 @@ if __name__ == "__main__":
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:
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 818e0cec6d..dc2ceef339 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -683,7 +683,7 @@ class dc_join(object):
ctx.destination_dsa_guid = destination_dsa_guid
print "Committing SAM database"
- except:
+ except Exception:
ctx.local_samdb.transaction_cancel()
raise
else:
diff --git a/source4/scripting/python/samba/netcmd/dbcheck.py b/source4/scripting/python/samba/netcmd/dbcheck.py
index bd250eb6be..875b059506 100644
--- a/source4/scripting/python/samba/netcmd/dbcheck.py
+++ b/source4/scripting/python/samba/netcmd/dbcheck.py
@@ -112,7 +112,7 @@ class cmd_dbcheck(Command):
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
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 6c2ebfa301..1e26850277 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -855,7 +855,7 @@ class cmd_domain_samba3upgrade(Command):
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.")
diff --git a/source4/scripting/python/samba/provision/sambadns.py b/source4/scripting/python/samba/provision/sambadns.py
index db98f13ddd..4805294676 100644
--- a/source4/scripting/python/samba/provision/sambadns.py
+++ b/source4/scripting/python/samba/provision/sambadns.py
@@ -719,7 +719,7 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
"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]
@@ -754,7 +754,7 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
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
diff --git a/source4/scripting/python/samba/tests/dcerpc/testrpc.py b/source4/scripting/python/samba/tests/dcerpc/testrpc.py
index 44fed72fff..9c2541934f 100644
--- a/source4/scripting/python/samba/tests/dcerpc/testrpc.py
+++ b/source4/scripting/python/samba/tests/dcerpc/testrpc.py
@@ -61,7 +61,7 @@ class RpcTests(object):
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