[PATCH 30/55] Support using third party iso8601 module if system doesn't provide one.

Jelmer Vernooij jelmer at samba.org
Fri Feb 6 12:04:02 MST 2015


Change-Id: I5d035738d244d66d33788636c8ee8b322c227a0e
Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
---
 python/samba/subunit/__init__.py | 5 +++++
 selftest/subunithelper.py        | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/python/samba/subunit/__init__.py b/python/samba/subunit/__init__.py
index ab55ace..cdc5933 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 a1d49fd..5308e99 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']
-- 
2.1.4



More information about the samba-technical mailing list