summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-11-01 12:38:48 +1300
committerKarolin Seeger <kseeger@samba.org>2016-11-30 12:19:34 +0100
commit9f9e67ecdeeeb33d233938b32658d7fdde29fd48 (patch)
tree3ade384e37c9bb16305ceab69a95001251434ee6 /python
parentca5d70071fc4aec3ad1984f912eed9a28b8ae00f (diff)
downloadsamba-9f9e67ecdeeeb33d233938b32658d7fdde29fd48.tar.gz
python-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions
This will allow callers to catch specific errors rather than RuntimeException As this slightly changes the exception, the timecmd test must be updated. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 (cherry picked from commit 2a49c7451949d42e5a4d6fce3ce607f05f9e7b71)
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/samba_tool/timecmd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/tests/samba_tool/timecmd.py b/python/samba/tests/samba_tool/timecmd.py
index 310f861f709..68dcb06c402 100644
--- a/python/samba/tests/samba_tool/timecmd.py
+++ b/python/samba/tests/samba_tool/timecmd.py
@@ -39,5 +39,5 @@ class TimeCmdTestCase(SambaToolCmdTest):
"""Run time against a non-existent server, and make sure it fails"""
(result, out, err) = self.runcmd("time", "notaserver")
self.assertEquals(result, -1, "check for result code")
- self.assertTrue(err.strip().endswith("NT_STATUS_OBJECT_NAME_NOT_FOUND"), "ensure right error string")
+ self.assertNotEqual(err.strip().find("NT_STATUS_OBJECT_NAME_NOT_FOUND"), -1, "ensure right error string")
self.assertEquals(out, "", "ensure no output returned")