Skip to content

Commit

Permalink
* BUGFIX: Corrected error in CLI assigning nontypes to devices
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis-chambers committed Jul 2, 2024
1 parent 84bb6b8 commit 3798224
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/iotswarm/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,10 @@ async def _mqtt_resume_session():

for i in range(len(swarm.devices)):
swarm.devices[i].connection = connection
swarm.devices[i].max_cycles = max_cycles
swarm.devices[i].sleep_time = sleep_time
if max_cycles is not None:
swarm.devices[i].max_cycles = max_cycles
if sleep_time is not None:
swarm.devices[i].sleep_time = sleep_time

click.echo("Loaded swarm from pickle")

Expand Down Expand Up @@ -452,8 +454,10 @@ async def _mqtt_resume_session():

for i in range(len(swarm.devices)):
swarm.devices[i].connection = connection
swarm.devices[i].max_cycles = max_cycles
swarm.devices[i].sleep_time = sleep_time
if max_cycles is not None:
swarm.devices[i].max_cycles = max_cycles
if sleep_time is not None:
swarm.devices[i].sleep_time = sleep_time

click.echo(swarm.devices[0].cycle)
click.echo("Loaded swarm from pickle")
Expand Down

0 comments on commit 3798224

Please sign in to comment.