mutable varibale bug
This commit is contained in:
4
mswp.py
4
mswp.py
@@ -1,5 +1,7 @@
|
|||||||
class Datapack:
|
class Datapack:
|
||||||
def __init__(self, method='post', app='all', version='msw/1.0', head={}, body=b'', check_head=True):
|
def __init__(self, method='post', app='all', version='msw/1.0', head=None, body=b'', check_head=True):
|
||||||
|
if head is None:
|
||||||
|
self.head = {}
|
||||||
self.method = method
|
self.method = method
|
||||||
self.app = app
|
self.app = app
|
||||||
self.version = version
|
self.version = version
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class Netrecv:
|
|||||||
while True:
|
while True:
|
||||||
|
|
||||||
# try unpack #
|
# try unpack #
|
||||||
dp = copy.copy(Datapack(check_head=False))
|
dp = Datapack(check_head=False)
|
||||||
dp.encode_data = data
|
dp.encode_data = data
|
||||||
print('data', data)
|
print('data', data)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user