Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
cblmemo committed Sep 17, 2023
1 parent 3e2ad9a commit ddbd22f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sky/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ def __init__(
ports = resources_utils.simplify_ports(
[str(port) for port in ports])
if not ports:
# Set to None if empty. This is mainly for resources from
# cli, which will comes in as an empty tuple.
ports = None
self._ports = ports

Expand Down Expand Up @@ -263,7 +265,7 @@ def __repr__(self) -> str:
disk_size = f', disk_size={self.disk_size}'

ports = ''
if self.ports:
if self.ports is not None:
ports = f', ports={self.ports}'

if self._instance_type is not None:
Expand Down

0 comments on commit ddbd22f

Please sign in to comment.