summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/netcmd
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-01-24 11:54:54 +1100
committerAmitay Isaacs <amitay@samba.org>2012-01-24 03:32:40 +0100
commit1f0298dd1b1a939cb215e7b474178b217f8347f4 (patch)
tree6ca7a3908b797f6e35b91c6156fb9d9a5bed4697 /source4/scripting/python/samba/netcmd
parentbe292021f47eeaa1364bedb2dc9232b60c404fce (diff)
downloadsamba-1f0298dd1b1a939cb215e7b474178b217f8347f4.tar.gz
samba-1f0298dd1b1a939cb215e7b474178b217f8347f4.tar.xz
samba-1f0298dd1b1a939cb215e7b474178b217f8347f4.zip
python: Change except: statement to except Exception:
This way we only catch true exceptions and keyboard interrupts are not caught here. Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Jan 24 03:32:40 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python/samba/netcmd')
-rw-r--r--source4/scripting/python/samba/netcmd/dbcheck.py2
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/dbcheck.py b/source4/scripting/python/samba/netcmd/dbcheck.py
index bd250eb6be5..875b0595060 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 6c2ebfa3018..1e26850277f 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.")