summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-12-14 20:27:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2015-03-06 04:41:48 +0100
commit850b3938e151707470044478a540d4573b25f72f (patch)
tree7d6739df74dc7010db709de31f397db4e285cb54
parent13bd83ad30ab083351084a3256bc9f06c8f34555 (diff)
downloadsamba-850b3938e151707470044478a540d4573b25f72f.tar.gz
samba-850b3938e151707470044478a540d4573b25f72f.tar.xz
samba-850b3938e151707470044478a540d4573b25f72f.zip
Support using third party iso8601 module if system doesn't provide one.
Change-Id: I5d035738d244d66d33788636c8ee8b322c227a0e Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--python/samba/subunit/__init__.py5
-rw-r--r--selftest/subunithelper.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/python/samba/subunit/__init__.py b/python/samba/subunit/__init__.py
index ab55ace104..cdc593398a 100644
--- a/python/samba/subunit/__init__.py
+++ b/python/samba/subunit/__init__.py
@@ -17,6 +17,11 @@
"""Subunit test protocol."""
+import samba
+
+samba.ensure_third_party_module("iso8601", "pyiso8601")
+import iso8601
+
import unittest
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index a1d49fd51c..5308e99a24 100644
--- a/selftest/subunithelper.py
+++ b/selftest/subunithelper.py
@@ -21,7 +21,7 @@ import re
import sys
from samba import subunit
from samba.subunit.run import TestProtocolClient
-import iso8601
+from samba.subunit import iso8601
import unittest
VALID_RESULTS = ['success', 'successful', 'failure', 'fail', 'skip', 'knownfail', 'error', 'xfail', 'skip-testsuite', 'testsuite-failure', 'testsuite-xfail', 'testsuite-success', 'testsuite-error', 'uxsuccess', 'testsuite-uxsuccess']