autopep8: Update with changes to make autopep8 -a -a -a happy
This commit is contained in:
parent
a7541ad8b4
commit
44c28c8c16
26 changed files with 66 additions and 59 deletions
|
|
@ -652,7 +652,7 @@ class LoopControl:
|
|||
if callable(setup):
|
||||
try:
|
||||
setup(lo)
|
||||
except:
|
||||
except BaseException:
|
||||
lo.close()
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,12 @@ def parse_arguments(sys_argv):
|
|||
help="directory containing stages, assemblers, and the osbuild library")
|
||||
parser.add_argument("--cache-max-size", metavar="SIZE", type=parse_size, default=None,
|
||||
help="maximum size of the cache (bytes) or 'unlimited' for no restriction")
|
||||
parser.add_argument("--checkpoint", metavar="ID", action="append", type=str, default=None,
|
||||
parser.add_argument(
|
||||
"--checkpoint",
|
||||
metavar="ID",
|
||||
action="append",
|
||||
type=str,
|
||||
default=None,
|
||||
help="stage to commit to the object store during build (can be passed multiple times), accepts globs")
|
||||
parser.add_argument("--export", metavar="ID", action="append", type=str, default=[],
|
||||
help="object to export, can be passed multiple times")
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ class FsCache(contextlib.AbstractContextManager, os.PathLike):
|
|||
raise
|
||||
|
||||
return (name, lockfd)
|
||||
except:
|
||||
except BaseException:
|
||||
# On error, we might have already created the directory or even
|
||||
# linked the lock-file. Try unlinking both, but ignore errors if
|
||||
# they do not exist. Due to using UUIDs as names we cannot conflict
|
||||
|
|
@ -703,7 +703,7 @@ class FsCache(contextlib.AbstractContextManager, os.PathLike):
|
|||
|
||||
self._active = True
|
||||
return self
|
||||
except:
|
||||
except BaseException:
|
||||
self.__exit__(None, None, None)
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ class Socket(contextlib.AbstractContextManager):
|
|||
# default destination for send operations.
|
||||
if connect_to is not None:
|
||||
sock.connect(os.fspath(connect_to))
|
||||
except:
|
||||
except BaseException:
|
||||
if sock is not None:
|
||||
sock.close()
|
||||
raise
|
||||
|
|
@ -255,7 +255,7 @@ class Socket(contextlib.AbstractContextManager):
|
|||
sock.bind(os.fspath(bind_to))
|
||||
unlink = os.open(os.path.join(".", path[0]), os.O_CLOEXEC | os.O_PATH)
|
||||
sock.setblocking(False)
|
||||
except:
|
||||
except BaseException:
|
||||
if unlink is not None:
|
||||
os.close(unlink)
|
||||
if sock is not None:
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ class Disk:
|
|||
|
||||
try:
|
||||
self._init_headers()
|
||||
except: # pylint: disable=broad-except
|
||||
except BaseException: # pylint: disable=broad-except
|
||||
self.fp.close()
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,11 @@ SCHEMA = """
|
|||
"""
|
||||
|
||||
|
||||
# Corresponds to https://github.com/coreos/rpm-ostree/blob/7b9a20b20ecd5a2ceb11ca9edf86984dc3065183/rust/src/composepost.rs#L58
|
||||
# Corresponds to
|
||||
# https://github.com/coreos/rpm-ostree/blob/7b9a20b20ecd5a2ceb11ca9edf86984dc3065183/rust/src/composepost.rs#L58
|
||||
TOPLEVEL_DIRS = ["dev", "proc", "run", "sys", "sysroot", "var"]
|
||||
# Corresponds to https://github.com/coreos/rpm-ostree/blob/7b9a20b20ecd5a2ceb11ca9edf86984dc3065183/rust/src/composepost.rs#L123
|
||||
# Corresponds to
|
||||
# https://github.com/coreos/rpm-ostree/blob/7b9a20b20ecd5a2ceb11ca9edf86984dc3065183/rust/src/composepost.rs#L123
|
||||
TOPLEVEL_LINKS = {
|
||||
"home": "var/home",
|
||||
"media": "run/media",
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ def can_setup_netns() -> bool:
|
|||
try:
|
||||
with netns():
|
||||
return True
|
||||
except: # pylint: disable=bare-except
|
||||
except BaseException: # pylint: disable=bare-except
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ def mapping_is_subset(subset, other):
|
|||
"""
|
||||
if isinstance(subset, Mapping) and isinstance(other, Mapping):
|
||||
for key, value in subset.items():
|
||||
if not key in other:
|
||||
if key not in other:
|
||||
return False
|
||||
|
||||
other_value = other[key]
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ class DepSolver:
|
|||
if not result.scheme:
|
||||
path = basedir.joinpath(baseurl)
|
||||
return path.resolve().as_uri()
|
||||
except: # pylint: disable=bare-except
|
||||
except BaseException: # pylint: disable=bare-except
|
||||
pass
|
||||
|
||||
return baseurl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue