mirror of
https://github.com/curl/curl.git
synced 2026-07-28 07:23:07 +03:00
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
This commit is contained in:
parent
8d9802b0ae
commit
3c9066fce5
7 changed files with 59 additions and 24 deletions
|
|
@ -29,7 +29,7 @@ Basic SMB request
|
|||
-u 'curltest:curltest' smb://%HOSTIP:%SMBPORT/TESTS/1451
|
||||
</command>
|
||||
<precheck>
|
||||
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))"
|
||||
</precheck>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<keywords>
|
||||
TELNET
|
||||
UPLOAD
|
||||
flaky
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue