[Python] Different work of the script in Windows and in FreeBSD
- by www.yegorov-p.ru
Hello.
I'm writing some script, that works with web-servers.
So, I have the following code:
client = suds.client.Client(WSDLfile)
client.service.Login('mylogin', 'mypass')
print client.options.transport.cookiejar
#######
sessnum = str(client.options.transport.cookiejar).split(' ')[1]
client = suds.client.Client( WSDLfile, headers= { 'Set-Cookie' : sessnum } )
When running in FreeBSD, it returns
<cookielib.CookieJar[<Cookie sessnum=9WAXQ25D37XY535F6SZ3GXKSCTZG8CVJ for .IP.IP.IP.IP/>]>
but in Windows it returns
<cookielib.CookieJar[]>
How can I fix it?