From 3c9066fce54b78cc8b46e82eba033aaa373cdef1 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Tue, 17 Mar 2020 10:36:25 +0100 Subject: tests: make Python-based servers compatible with Python 2 and 3 Update smbserver.py and negtelnetserver.py to be compatible with Python 3 while staying backwards-compatible to support Python 2. Fix string encoding and handling of echoed and transferred data. Tested with both Python 2.7.17 and Python 3.7.7 Reported-by: Daniel Stenberg Assisted-by: Kamil Dudka Reviewed-by: Marcel Raad Fixes #5104 Closes #5110 --- tests/data/test1451 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/data/test1451') diff --git a/tests/data/test1451 b/tests/data/test1451 index a45f41eed..9337b8b99 100644 --- a/tests/data/test1451 +++ b/tests/data/test1451 @@ -29,7 +29,7 @@ Basic SMB request -u 'curltest:curltest' smb://%HOSTIP:%SMBPORT/TESTS/1451 -python2 -c "__import__('pkgutil').find_loader('impacket') or (__import__('sys').stdout.write('Test only works if Python package impacket is installed\n'), __import__('sys').exit(1))" +python -c "__import__('pkgutil').find_loader('impacket') or (__import__('sys').stdout.write('Test only works if Python package impacket is installed\n'), __import__('sys').exit(1))" -- cgit v1.2.3