@@ -611,10 +611,6 @@ async def refresh(
611611 :param str switch: Crossgrade charm url
612612
613613 """
614- if path is not None :
615- await self .local_refresh (channel , force , force_series , force_units ,
616- path , resources )
617- return
618614 if resources is not None :
619615 raise NotImplementedError ("resources option is not implemented" )
620616
@@ -637,6 +633,11 @@ async def refresh(
637633 charm_url = switch or charm_url_origin_result .url
638634 origin = charm_url_origin_result .charm_origin
639635
636+ if path is not None :
637+ await self .local_refresh (origin , force , force_series ,
638+ force_units , path , resources )
639+ return
640+
640641 parsed_url = URL .parse (charm_url )
641642 charm_name = parsed_url .name
642643
@@ -766,7 +767,8 @@ async def refresh(
766767 upgrade_charm = refresh
767768
768769 async def local_refresh (
769- self , channel = None , force = False , force_series = False , force_units = False ,
770+ self , charm_origin = None , force = False , force_series = False ,
771+ force_units = False ,
770772 path = None , resources = None ):
771773 """Refresh the charm for this application with a local charm.
772774
@@ -809,7 +811,7 @@ async def local_refresh(
809811 # Update application
810812 await app_facade .SetCharm (
811813 application = self .entity_id ,
812- channel = channel ,
814+ charm_origin = charm_origin ,
813815 charm_url = charm_url ,
814816 config_settings = None ,
815817 config_settings_yaml = None ,
0 commit comments