Skip to content

Commit

Permalink
fixup! Fix W0135 reported by pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
pirat89 committed May 14, 2024
1 parent 38298fb commit 863cc83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions repos/system_upgrade/common/libraries/dnfplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ def perform_transaction_install(target_userspace_info, storage_info, used_repos,

@contextlib.contextmanager
def _prepare_perform(used_repos, target_userspace_info, xfs_info, storage_info, target_iso=None):
# noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
# NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
# implicitly
reserve_space = overlaygen.get_recommended_leapp_free_space(target_userspace_info.path)
with _prepare_transaction(used_repos=used_repos,
target_userspace_info=target_userspace_info
Expand Down
3 changes: 3 additions & 0 deletions repos/system_upgrade/common/libraries/overlaygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ def _mount_dnf_cache(overlay_target):
"""
Convenience context manager to ensure bind mounted /var/cache/dnf and removal of the mount.
"""
# noqa: W0135; pylint: disable=contextmanager-generator-missing-cleanup
# NOTE(pstodulk): the pylint check is not valid in this case - finally is covered
# implicitly
with mounting.BindMount(
source='/var/cache/dnf',
target=os.path.join(overlay_target, 'var', 'cache', 'dnf')) as cache_mount:
Expand Down

0 comments on commit 863cc83

Please sign in to comment.