[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Tue Jan 4 19:38:01 MST 2011
The branch, master has been updated
via 26c8a52 upgradeprovision: Fix use of dict.get().
from e80b322 s4-python: Allow setting TEST_DEBUG_LEVEL to override debug level for tests.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 26c8a520f3284391820424df2bf4158b276dd32b
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Jan 5 02:48:03 2011 +0100
upgradeprovision: Fix use of dict.get().
Avoid modifying list while iterating over it.
Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
Autobuild-Date: Wed Jan 5 03:37:35 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/scripting/bin/upgradeprovision | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 27e142b..36c99ee 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -855,19 +855,13 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
isFirst = 0
txt = ""
- for att in delta:
+ for att in list(delta):
if usns is not None:
# We have updated by provision usn information so let's exploit
# replMetadataProperties
if att in forwardlinked:
- if current[0].get():
- curval = current[0][att]
- else:
- curval = ()
- if reference[0].get():
- refval = reference[0][att]
- else:
- refval = ()
+ curval = current[0].get(att, ())
+ refval = reference[0].get(att, ())
handle_links(samdb, att, basedn, current[0]["dn"],
curval, refval, delta)
continue
@@ -1696,8 +1690,8 @@ if __name__ == '__main__':
for att in deltaattr:
if att.lower() == "dn":
continue
- if deltaattr.get(att) is not None \
- and deltaattr.get(att).flags() != FLAG_MOD_ADD:
+ if (deltaattr.get(att) is not None
+ and deltaattr.get(att).flags() != FLAG_MOD_ADD):
doit = False
elif deltaattr.get(att) is None:
doit = False
--
Samba Shared Repository
More information about the samba-cvs
mailing list