net/py-msrplib: Update to 0.21.1
- Update MASTER_SITES
This commit is contained in:
parent
4ce441d975
commit
e027d13dea
@ -1,10 +1,9 @@
|
||||
PORTNAME= msrplib
|
||||
PORTVERSION= 0.20.0
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 0.21.1
|
||||
CATEGORIES= net python
|
||||
MASTER_SITES= http://download.ag-projects.com/MSRP/
|
||||
MASTER_SITES= https://download.ag-projects.com/MSRP/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= python-${PORTNAME}-${PORTVERSION}
|
||||
DISTNAME= python3-msrplib-${PORTVERSION}
|
||||
|
||||
MAINTAINER= python@FreeBSD.org
|
||||
COMMENT= Python MSRP client library
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1597570081
|
||||
SHA256 (python-msrplib-0.20.0.tar.gz) = 3a2ed4f174b6e758bb511b05211177cdc0c887c77488cbf0c31fe34b669d6231
|
||||
SIZE (python-msrplib-0.20.0.tar.gz) = 34278
|
||||
TIMESTAMP = 1747520769
|
||||
SHA256 (python3-msrplib-0.21.1.tar.gz) = e8c916ca8c74a20a285553605acab7942cd29f66fb1dff9ea28aee4c19bea1df
|
||||
SIZE (python3-msrplib-0.21.1.tar.gz) = 42149
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
--- msrplib/digest.py.orig 2017-09-29 19:26:59 UTC
|
||||
+++ msrplib/digest.py
|
||||
@@ -6,7 +6,7 @@ from base64 import b64encode, b64decode
|
||||
import random
|
||||
|
||||
def get_random_data(length):
|
||||
- return ''.join(chr(random.randint(0, 255)) for x in xrange(length))
|
||||
+ return ''.join(chr(random.randint(0, 255)) for x in range(length))
|
||||
|
||||
class LoginFailed(Exception):
|
||||
pass
|
||||
@@ -28,7 +28,7 @@ def calc_hash(**parameters):
|
||||
return md5(hash_text).hexdigest()
|
||||
|
||||
def calc_responses(**parameters):
|
||||
- if parameters.has_key("ha1"):
|
||||
+ if "ha1" in parameters:
|
||||
ha1 = parameters.pop("ha1")
|
||||
else:
|
||||
ha1 = calc_ha1(**parameters)
|
||||
@@ -80,7 +80,7 @@ class AuthChallenger(object):
|
||||
nonce = parameters["nonce"]
|
||||
opaque = parameters["opaque"]
|
||||
response = parameters["response"]
|
||||
- except IndexError, e:
|
||||
+ except IndexError as e:
|
||||
raise LoginFailed("Parameter not present: %s", e.message)
|
||||
try:
|
||||
expected_response, rspauth = calc_responses(ha1 = ha1, **parameters)
|
||||
--- msrplib/session.py.orig 2020-02-07 08:31:31 UTC
|
||||
+++ msrplib/session.py
|
||||
@@ -120,7 +120,7 @@ class MSRPSession(object):
|
||||
chunk = self.msrp.make_send_request()
|
||||
chunk.add_header(protocol.MSRPHeader('Keep-Alive', 'yes'))
|
||||
self.deliver_chunk(chunk)
|
||||
- except MSRPTransactionError, e:
|
||||
+ except MSRPTransactionError as e:
|
||||
if e.code == 408:
|
||||
self.msrp.loseConnection(wait=False)
|
||||
self.set_state('CLOSING')
|
||||
@@ -237,7 +237,7 @@ class MSRPSession(object):
|
||||
if item is None:
|
||||
break
|
||||
self._write_chunk(item.chunk, item.response_callback)
|
||||
- except ConnectionClosedErrors + (proc.LinkedExited, proc.ProcExit), e:
|
||||
+ except ConnectionClosedErrors + (proc.LinkedExited, proc.ProcExit) as e:
|
||||
self.logger.debug('writer: exiting because of %r' % e)
|
||||
except:
|
||||
self.logger.exception('writer: captured unhandled exception:')
|
||||
--- msrplib/transport.py.orig 2020-02-07 08:31:31 UTC
|
||||
+++ msrplib/transport.py
|
||||
@@ -46,7 +46,7 @@ class MSRPNoSuchSessionError(MSRPTransactionError):
|
||||
comment = 'No such session'
|
||||
|
||||
|
||||
-data_start, data_end, data_write, data_final_write = range(4)
|
||||
+data_start, data_end, data_write, data_final_write = list(range(4))
|
||||
|
||||
|
||||
def make_report(chunk, code, comment):
|
||||
@@ -244,7 +244,7 @@ class MSRPTransport(GreenTransportBase):
|
||||
"""Generate and write the response, lose the connection in case of error"""
|
||||
try:
|
||||
response = make_response(chunk, code, comment)
|
||||
- except ChunkParseError, ex:
|
||||
+ except ChunkParseError as ex:
|
||||
log.error('Failed to generate a response: %s' % ex)
|
||||
self.loseConnection(wait=False)
|
||||
raise
|
||||
Loading…
x
Reference in New Issue
Block a user