lint

parent b0412fec
Pipeline #1778 passed with stages
in 31 minutes and 38 seconds
......@@ -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(
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment