Migrate to py3
This commit is contained in:
parent
aa4cc7df1d
commit
e67db95e11
3
setup.py
3
setup.py
|
@ -26,7 +26,8 @@ setup(name='seurvalencia',
|
|||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: GNU Affero General Public License v3',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#This file is part of seurvalencia. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
|
||||
__version__ = '0.0.3'
|
||||
__version__ = '0.0.4'
|
||||
|
||||
__all__ = [
|
||||
'API',
|
||||
'Picking',
|
||||
]
|
||||
|
||||
from api import API
|
||||
from picking import Picking
|
||||
from .api import API
|
||||
from .picking import Picking
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#this repository contains the full copyright notices and license terms.
|
||||
from seurvalencia.utils import seurvalencia_url
|
||||
from xml.dom.minidom import parseString
|
||||
import urllib2
|
||||
from urllib import request
|
||||
import socket
|
||||
import os
|
||||
import genshi.template
|
||||
|
@ -66,9 +66,9 @@ class API(object):
|
|||
'Content-Type': 'text/xml; charset=utf-8',
|
||||
'Content-Length': len(xml),
|
||||
}
|
||||
request = urllib2.Request(self.url, xml, headers)
|
||||
rqst = request.Request(self.url, xml, headers)
|
||||
try:
|
||||
response = urllib2.urlopen(request)
|
||||
response = request.urlopen(rqst)
|
||||
return response.read()
|
||||
except socket.timeout as err:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue