1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

dsdb python tests: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power
2018-02-23 14:34:23 +00:00
committed by Douglas Bagnall
parent 9f61bf115e
commit 0c31d38794
19 changed files with 904 additions and 452 deletions

View File

@ -71,7 +71,8 @@ class DescriptorTests(samba.tests.TestCase):
class_dn = "CN=%s,%s" % (class_name, self.schema_dn)
try:
self.ldb_admin.search(base=class_dn, attrs=["name"])
except LdbError, (num, _):
except LdbError as e:
(num, _) = e.args
self.assertEquals(num, ERR_NO_SUCH_OBJECT)
break