From: Douglas Bagnall Date: Tue, 13 Feb 2018 21:34:23 +0000 (+1300) Subject: drs torture python: convert 'except X, e' to 'except X as e' X-Git-Tag: tevent-0.9.36~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf2086e137e00414669828991027d9c450fd0bcc;p=thirdparty%2Fsamba.git drs torture python: convert 'except X, e' to 'except X as e' Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/torture/drs/python/linked_attributes_drs.py b/source4/torture/drs/python/linked_attributes_drs.py index 160135e7fdd..0f96f64c892 100644 --- a/source4/torture/drs/python/linked_attributes_drs.py +++ b/source4/torture/drs/python/linked_attributes_drs.py @@ -43,7 +43,7 @@ class LATests(drs_base.DrsBaseTestCase): if True: try: self.samdb.delete(self.ou, ['tree_delete:1']) - except ldb.LdbError, e: + except ldb.LdbError as e: pass self.samdb.add({'objectclass': 'organizationalUnit', 'dn': self.ou}) @@ -55,7 +55,7 @@ class LATests(drs_base.DrsBaseTestCase): super(LATests, self).tearDown() try: self.samdb.delete(self.ou, ['tree_delete:1']) - except ldb.LdbError, e: + except ldb.LdbError as e: pass def delete_user(self, user): diff --git a/source4/torture/drs/python/ridalloc_exop.py b/source4/torture/drs/python/ridalloc_exop.py index 80d011132ff..5d44aaaf754 100644 --- a/source4/torture/drs/python/ridalloc_exop.py +++ b/source4/torture/drs/python/ridalloc_exop.py @@ -231,7 +231,7 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase): # 3. Make sure the allocation succeeds try: (level, ctr) = drs.DsGetNCChanges(drs_handle, 8, req8) - except RuntimeError, e: + except RuntimeError as e: self.fail("RID allocation failed: " + str(e)) fsmo_dn = ldb.Dn(self.ldb_dc1, "CN=RID Manager$,CN=System," + self.ldb_dc1.domain_dn())