Skip to content

Commit

Permalink
removing duplicate getSize function
Browse files Browse the repository at this point in the history
  • Loading branch information
ShutdownRepo committed Oct 21, 2023
1 parent 3ff0d65 commit f53ff45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions exegol/console/TUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ def __buildImageTable(table: Table, data: Sequence[ExegolImage], safe_key: bool
image.getRealSize(), image.getBuildDate(), image.getStatus())
else:
if safe_key:
table.add_row(str(i + 1), image.getDisplayName(), image.getSize(), image.getStatus())
table.add_row(str(i + 1), image.getDisplayName(), image.getRealSize(), image.getStatus())
else:
table.add_row(image.getDisplayName(), image.getSize(), image.getStatus())
table.add_row(image.getDisplayName(), image.getRealSize(), image.getStatus())

@staticmethod
def __buildContainerTable(table: Table, data: Sequence[ExegolContainer], safe_key: bool = False):
Expand Down
4 changes: 0 additions & 4 deletions exegol/model/ExegolImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,6 @@ def getDownloadSize(self) -> str:
return "local"
return self.__dl_size

def getSize(self) -> str:
"""Image size getter. If the image is installed, return the on-disk size, otherwise return the remote size"""
return self.__disk_size if self.__is_install else f"[bright_black]~{self.__remote_est_size}[/bright_black]"

def getEntrypointConfig(self) -> Optional[Union[str, List[str]]]:
"""Image's entrypoint configuration getter.
Exegol images before 3.x.x don't have any entrypoint set (because /.exegol/entrypoint.sh don't exist yet. In this case, this getter will return None."""
Expand Down

0 comments on commit f53ff45

Please sign in to comment.