mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
lint
This commit is contained in:
parent
b0412fec66
commit
48aed7aa2a
3 changed files with 9 additions and 9 deletions
|
|
@ -244,16 +244,16 @@ class TaskGetFile(Resource):
|
|||
lengthbuf = socket.recv(8)
|
||||
length, = struct.unpack('!Q', lengthbuf)
|
||||
|
||||
def stream(sock, l):
|
||||
def stream(sock, size):
|
||||
"""The restoration took place on another server so we need
|
||||
to stream the file that is not present on the current
|
||||
machine.
|
||||
"""
|
||||
bsize = 1024
|
||||
received = 0
|
||||
if l < bsize:
|
||||
bsize = l
|
||||
while received < l:
|
||||
if size < bsize:
|
||||
bsize = size
|
||||
while received < size:
|
||||
buf = b''
|
||||
r, _, _ = select.select([sock], [], [], 5)
|
||||
if not r:
|
||||
|
|
@ -262,7 +262,7 @@ class TaskGetFile(Resource):
|
|||
if not buf:
|
||||
continue
|
||||
received += len(buf)
|
||||
self.logger.debug('{}/{}'.format(received, l))
|
||||
self.logger.debug('{}/{}'.format(received, size))
|
||||
yield buf
|
||||
sock.sendall(struct.pack('!Q', 2))
|
||||
sock.sendall(b'RE')
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@ def diag(client, host, tips):
|
|||
err(
|
||||
'Some errors have been found in your configuration. '
|
||||
'Please make sure you ran this command with the right flags! '
|
||||
'(see --help for details).'.format(sys.argv[0], sys.argv[1])
|
||||
'(see --help for details).'
|
||||
)
|
||||
else:
|
||||
info(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue