We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b09a7a9 commit 85421e3Copy full SHA for 85421e3
netsim/cli/down.py
@@ -175,9 +175,14 @@ def stop_all(topology: Box, args: argparse.Namespace) -> None:
175
Find a lab instance and change directory so the rest of the shutdown
176
process works from that directory
177
"""
178
-def change_lab_instance(instance: str) -> None:
+def change_lab_instance(instance: typing.Union[int,str]) -> None:
179
topology = _read.system_defaults()
180
lab_states = status.read_status(topology)
181
+ try: # Maybe the instance is an integer?
182
+ instance = int(instance)
183
+ except:
184
+ pass
185
+
186
if not instance in lab_states:
187
log.fatal(f'Unknown instance {instance}, use "netlab status --all" to display running instances')
188
0 commit comments