Skip to content

Commit a1c4f20

Browse files
committed
Correct result field switch for 2.9
ActionFacade.Run
1 parent c5f2bac commit a1c4f20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

juju/unit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ async def run(self, command, timeout=None):
145145
timeout=timeout,
146146
units=[self.name],
147147
)
148-
return await self.model.wait_for_action(res.actions[0].action.tag)
148+
the_action = res.results[0] if self.connection.is_using_old_client else res.actions[0]
149+
return await self.model.wait_for_action(the_action.action.tag)
149150

150151
async def run_action(self, action_name, **params):
151152
"""Run an action on this unit.

0 commit comments

Comments
 (0)