summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/upgradehelpers.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-29 14:15:57 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-29 18:04:42 +1100
commit37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6 (patch)
treee44efedee115beac377d1fc9ab3a22c5e6cc2cee /source4/scripting/python/samba/upgradehelpers.py
parent62506903101e8e8e1cfc6c70fee245f97c646844 (diff)
downloadsamba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.tar.gz
samba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.tar.xz
samba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.zip
s4-samba-tool: fixed exception handling in subcommands
this switches to the new pattern of: except Exception, e: raise CommandError("some error message", e)
Diffstat (limited to 'source4/scripting/python/samba/upgradehelpers.py')
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index b6e7de8c8f8..ded3ff13070 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -91,22 +91,22 @@ class ProvisionLDB(object):
ok = True
try:
self.sam.transaction_cancel()
- except:
+ except Exception:
ok = False
try:
self.secrets.transaction_cancel()
- except:
+ except Exception:
ok = False
try:
self.idmap.transaction_cancel()
- except:
+ except Exception:
ok = False
try:
self.privilege.transaction_cancel()
- except:
+ except Exception:
ok = False
return ok
@@ -122,7 +122,7 @@ class ProvisionLDB(object):
self.secrets.transaction_prepare_commit()
self.idmap.transaction_prepare_commit()
self.privilege.transaction_prepare_commit()
- except:
+ except Exception:
return self.groupedRollback()
# TO BE DONE
# self.hkcr.transaction_prepare_commit()
@@ -134,7 +134,7 @@ class ProvisionLDB(object):
self.secrets.transaction_commit()
self.idmap.transaction_commit()
self.privilege.transaction_commit()
- except:
+ except Exception:
return self.groupedRollback()
# TO BE DONE
@@ -688,13 +688,13 @@ def update_gpo(paths, samdb, names, lp, message, force=0):
try:
attribute = samba.xattr_tdb.wrap_getxattr(eadbname,
paths.sysvol, xattr.XATTR_NTACL_NAME)
- except:
+ except Exception:
attribute = samba.xattr_native.wrap_getxattr(paths.sysvol,
xattr.XATTR_NTACL_NAME)
else:
attribute = samba.xattr_native.wrap_getxattr(paths.sysvol,
xattr.XATTR_NTACL_NAME)
- except:
+ except Exception:
resetacls = True
if force: