summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-09 21:38:01 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-09 21:39:25 +1000
commit3d420ea2bb3259525a50964bf70b1956cf62d4c1 (patch)
tree7cb14b70fb5870691a13884e0f75099fb8ff0b3d /source4
parentb2ea0ca3d6280902135942f61cd3f28daecf77c1 (diff)
downloadsamba-3d420ea2bb3259525a50964bf70b1956cf62d4c1.tar.gz
samba-3d420ea2bb3259525a50964bf70b1956cf62d4c1.tar.bz2
samba-3d420ea2bb3259525a50964bf70b1956cf62d4c1.zip
s4-rodc: cope with missing searchFlags
this can be missing after the schema tests
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/drs_utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/drs_utils.py b/source4/scripting/python/samba/drs_utils.py
index 7b22a8413e..854608a1fd 100644
--- a/source4/scripting/python/samba/drs_utils.py
+++ b/source4/scripting/python/samba/drs_utils.py
@@ -94,9 +94,10 @@ class drs_Replicate():
if (int(system_flags) & (samba.dsdb.DS_FLAG_ATTR_NOT_REPLICATED |
samba.dsdb.DS_FLAG_ATTR_IS_CONSTRUCTED)):
continue
- search_flags = r["searchFlags"][0]
- if (int(search_flags) & samba.dsdb.SEARCH_FLAG_RODC_ATTRIBUTE):
- continue
+ if "searchFlags" in r:
+ search_flags = r["searchFlags"][0]
+ if (int(search_flags) & samba.dsdb.SEARCH_FLAG_RODC_ATTRIBUTE):
+ continue
attid = self.samdb.get_attid_from_lDAPDisplayName(ldap_display_name)
attids.append(int(attid))