Make pylint happy

This commit is contained in:
Marek Marczykowski-Górecki 2019-10-05 21:57:48 +02:00
parent e8c48ff7c8
commit 2d736f5aa8
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
6 changed files with 8 additions and 9 deletions

View File

@ -13,6 +13,7 @@ extension-pkg-whitelist=lxml.etree
disable=
bad-continuation,
raising-format-tuple,
import-outside-toplevel,
inconsistent-return-statements,
duplicate-code,
fixme,

View File

@ -555,10 +555,8 @@ class ExtractWorker3(Process):
file_size = int(match.groups()[0])
size_func(file_size)
break
else:
self.log.warning(
'unexpected tar output (no file size report): %s',
line)
self.log.warning(
'unexpected tar output (no file size report): %s', line)
return data_func(tar2_process.stdout)

View File

@ -359,7 +359,7 @@ class WrapperObjectsCollection(object):
def keys(self):
'''Get list of names.'''
self.refresh_cache()
return [key for key in self._names_list]
return list(self._names_list)
def items(self):
'''Get list of (key, value) pairs'''

View File

@ -176,8 +176,7 @@ class EventsDispatcher(object):
except asyncio.IncompleteReadError as err:
if err.partial == b'':
break
else:
raise
raise
if not subject:
subject = None

View File

@ -256,7 +256,7 @@ def main(args=None, app=None):
if args.pass_file is None:
if input("Do you want to proceed? [y/N] ").upper() != "Y":
exit(0)
sys.exit(0)
try:
backup.restore_do(restore_info)

View File

@ -634,7 +634,8 @@ def main(args=None, app=None):
if set(dom.tags).intersection(set(args.tags))]
pwrstates = {state: getattr(args, state) for state in DOMAIN_POWER_STATES}
domains = filter(lambda x: matches_power_states(x, **pwrstates), domains)
domains = [d for d in domains
if matches_power_states(d, **pwrstates)]
table = Table(domains, columns, spinner, args.raw_data)
table.write_table(sys.stdout)