tree: fix pylint warnings

This fixes pylint warnings on our modules that are currently not part of
CI-pylint. The fixes should all be straightforward.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
This commit is contained in:
David Rheinsberg 2022-09-13 12:28:27 +02:00 committed by Simon de Vlieger
parent cdd65d4fd9
commit 8c367dfa6f
6 changed files with 12 additions and 11 deletions

View file

@ -18,11 +18,10 @@ documentation for `osbuil.util.udev.UdevInhibitor`.
import argparse
import errno
import os
import sys
from typing import Dict, Optional
from typing import Dict
from osbuild import devices
from osbuild import loop
@ -64,6 +63,9 @@ class LoopbackService(devices.DeviceService):
def __init__(self, args: argparse.Namespace):
super().__init__(args)
self.ctl = loop.LoopControl()
self.fd = None
self.lo = None
self.sector_size = None
@staticmethod
def setup_loop(lo: loop.Loop):

View file

@ -140,11 +140,11 @@ class CryptDeviceService(devices.DeviceService):
self.devname = None
# finally close the device
res = subprocess.run(["cryptsetup", "-q", "close", name],
check=self.check,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="UTF-8")
subprocess.run(["cryptsetup", "-q", "close", name],
check=self.check,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="UTF-8")
def main():