Description: Avoid dependency on python-distutils
Author: Matthias Klose <doko@debian.org>
Bug: https://github.com/diyan/pywinrm/issues/219
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896420
Forwarded: yes
Reviewed-by: Harlan Lieberman-Berg <hlieberman@debian.org>Index: b/winrm/transport.py
===================================================================
--- a/winrm/transport.py
+++ b/winrm/transport.py
@@ -15,7 +15,6 @@ else:
 import requests
 import requests.auth
 import warnings
-from distutils.util import strtobool
 
 HAVE_KERBEROS = False
 try:
@@ -48,6 +47,16 @@ from winrm.encryption import Encryption
 __all__ = ['Transport']
 
 
+# copied from distutils.util
+def strtobool (val):
+    val = val.lower()
+    if val in ('y', 'yes', 't', 'true', 'on', '1'):
+        return 1
+    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
+        return 0
+    else:
+        raise ValueError("invalid truth value %r" % (val,))
+
 class UnsupportedAuthArgument(Warning):
     pass
 
