Browse Source

5.2.2: Improve `sporestack list` expired server handling

master 5.2.2
SporeStack 4 months ago
parent
commit
18ff8ea3f5
  1. 2
      setup.cfg
  2. 4
      src/sporestack/cli.py

2
setup.cfg

@ -1,6 +1,6 @@
[metadata]
name = sporestack
version = 5.2.1
version = 5.2.2
description = SporeStack.com library and client. Launch servers with Monero or Bitcoin.
long_description = file: README.md
long_description_content_type = text/markdown

4
src/sporestack/cli.py

@ -348,6 +348,8 @@ def list() -> None:
"""
List all locally known servers.
"""
from .exceptions import SporeStackUserError
directory = machine_info_path()
infos = []
for hostname_json in os.listdir(directory):
@ -360,7 +362,7 @@ def list() -> None:
saved_vm_info["expiration"] = upstream_vm_info.expiration
saved_vm_info["running"] = upstream_vm_info.running
infos.append(saved_vm_info)
except ValueError as e:
except SporeStackUserError as e:
expiration = saved_vm_info["expiration"]
human_expiration = time.strftime(
"%Y-%m-%d %H:%M:%S %z", time.localtime(expiration)

Loading…
Cancel
Save