Skip to content

Commit

Permalink
vm: remove duplicate file_exists()
Browse files Browse the repository at this point in the history
Reported by mypy.

Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Jul 25, 2024
1 parent 5a0b45b commit d40aeb1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def tools_version(self):
return "{major}.{minor}.{micro}-{build}".format(**version_dict)

def file_exists(self, filepath):
""" Test that the file at filepath exists. """
"""Returns True if the file exists, otherwise returns False."""
return self.ssh_with_result(['test', '-f', filepath]).returncode == 0

def detect_package_manager(self):
Expand Down Expand Up @@ -434,10 +434,6 @@ def clear_uefi_variables(self):
"""
self.param_remove('NVRAM', 'EFI-variables')

def file_exists(self, filepath):
"""Returns True if the file exists, otherwise returns False."""
return self.ssh_with_result(['test', '-f', filepath]).returncode == 0

def sign_bins(self):
for f in self.get_all_efi_bins():
self.sign(f)
Expand Down

0 comments on commit d40aeb1

Please sign in to comment.