From 48aed7aa2aa7dafef5a4ae915a5f7951710fdc49 Mon Sep 17 00:00:00 2001 From: ziirish Date: Sat, 23 May 2020 23:16:31 +0200 Subject: [PATCH] lint --- burpui/api/tasks.py | 10 +++++----- burpui/cli.py | 2 +- setup.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/burpui/api/tasks.py b/burpui/api/tasks.py index c40b2a1a..f6bce1c3 100644 --- a/burpui/api/tasks.py +++ b/burpui/api/tasks.py @@ -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') diff --git a/burpui/cli.py b/burpui/cli.py index be369c9e..06a9f1e2 100644 --- a/burpui/cli.py +++ b/burpui/cli.py @@ -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( diff --git a/setup.py b/setup.py index 5087898c..a29e2a72 100755 --- a/setup.py +++ b/setup.py @@ -219,8 +219,8 @@ def readme(): cpt = 0 skip = False with open(os.path.join(ROOT, 'README.rst')) as f: - for l in f.readlines(): - if l.rstrip() == 'Screenshots': + for line in f.readlines(): + if line.rstrip() == 'Screenshots': skip = True if skip: cpt += 1 @@ -228,7 +228,7 @@ def readme(): skip = False if skip: continue - desc += l + desc += line return desc