@@ -1000,7 +1000,15 @@ async def remove_storage(self, *storage_ids, force=False, destroy_storage=False)
10001000 if ret .results [0 ].error :
10011001 raise JujuError (ret .results [0 ].error .message )
10021002
1003- async def remove_application (self , app_name , block_until_done = False , force = False , destroy_storage = False , no_wait = False ):
1003+ async def remove_application (
1004+ self ,
1005+ app_name ,
1006+ block_until_done = False ,
1007+ force = False ,
1008+ destroy_storage = False ,
1009+ no_wait = False ,
1010+ timeout = None
1011+ ):
10041012 """Removes the given application from the model.
10051013
10061014 :param str app_name: Name of the application
@@ -1009,6 +1017,8 @@ async def remove_application(self, app_name, block_until_done=False, force=False
10091017 :param bool no_wait: Rush through application removal without waiting for each individual step to complete (=false)
10101018 :param bool block_until_done: Ensure the app is removed from the
10111019 model when returned
1020+ :param int timeout: Raise asyncio.exceptions.TimeoutError if the application is not removed
1021+ within the timeout period.
10121022 """
10131023 if app_name not in self .applications :
10141024 raise JujuError ("Given application doesn't seem to appear in the\
@@ -1019,7 +1029,7 @@ async def remove_application(self, app_name, block_until_done=False, force=False
10191029 no_wait = no_wait ,
10201030 )
10211031 if block_until_done :
1022- await self .block_until (lambda : app_name not in self .applications )
1032+ await self .block_until (lambda : app_name not in self .applications , timeout = timeout )
10231033
10241034 async def block_until (self , * conditions , timeout = None , wait_period = 0.5 ):
10251035 """Return only after all conditions are true.
0 commit comments