mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
tests: fix Python 3 compatibility of smbserver.py
This commit is contained in:
parent
02988b70cd
commit
8c7c4a6276
@ -26,7 +26,10 @@ import socket
|
||||
import time
|
||||
import datetime
|
||||
import struct
|
||||
import ConfigParser
|
||||
try: # Python 3
|
||||
import configparser
|
||||
except ImportError: # Python 2
|
||||
import ConfigParser as configparser
|
||||
import SocketServer
|
||||
import threading
|
||||
import logging
|
||||
@ -4130,7 +4133,7 @@ smb.SMB.TRANS_TRANSACT_NMPIPE :self.__smbTransHandler.transactNamedPipe
|
||||
if self.__serverConfig is None:
|
||||
if configFile is None:
|
||||
configFile = 'smb.conf'
|
||||
self.__serverConfig = ConfigParser.ConfigParser()
|
||||
self.__serverConfig = configparser.ConfigParser()
|
||||
self.__serverConfig.read(configFile)
|
||||
|
||||
self.__serverName = self.__serverConfig.get('global','server_name')
|
||||
|
Loading…
Reference in New Issue
Block a user