@@ -196,7 +196,7 @@ async def _download_bundle(self, charm_url, origin):
196196 }])
197197 if len (resp .results ) != 1 :
198198 raise JujuError ("expected one result, received {}" .format (resp .results ))
199-
199+
200200 result = resp .results [0 ]
201201 if not result .url :
202202 raise JujuError ("no url found for bundle {}" .format (charm_url .name ))
@@ -208,13 +208,13 @@ async def _download_bundle(self, charm_url, origin):
208208 return self ._get_bundle_yaml (archive )
209209
210210 raise JujuError ('charm facade not supported' )
211-
211+
212212 def _get_bundle_yaml (self , archive ):
213213 for member in archive .infolist ():
214214 if member .filename == "bundle.yaml" :
215215 return archive .read (member )
216216 raise JujuError ("bundle.yaml not found" )
217-
217+
218218 async def _resolve_charms (self ):
219219 deployed = dict ()
220220
@@ -243,7 +243,7 @@ async def _resolve_charms(self):
243243 charm_url = URL .parse (spec ['charm' ])
244244 channel = None
245245 track , risk = '' , ''
246- if 'channel' in spec :
246+ if 'channel' in spec :
247247 channel = Channel .parse (spec ['channel' ])
248248 track , risk = channel .track , channel .risk
249249
@@ -252,10 +252,10 @@ async def _resolve_charms(self):
252252 else :
253253 architecture = await self .model ._resolve_architecture (charm_url )
254254
255- origin = client .CharmOrigin (source = "charm-hub" ,
256- architecture = architecture ,
257- risk = risk ,
258- track = track )
255+ origin = client .CharmOrigin (source = "charm-hub" ,
256+ architecture = architecture ,
257+ risk = risk ,
258+ track = track )
259259 charm_url , charm_origin = await self .model ._resolve_charm (charm_url , origin )
260260
261261 spec ['charm' ] = str (charm_url )
@@ -264,10 +264,9 @@ async def _resolve_charms(self):
264264 self .origins [str (charm_url )] = {}
265265 self .origins [str (charm_url )][str (channel )] = charm_origin
266266 else :
267- results = await self .client_facade .ResolveCharms (references = [spec ['charm' ]])
267+ await self .client_facade .ResolveCharms (references = [spec ['charm' ]])
268268 # TODO (stickupkid): Ensure that this works as expected.
269269
270-
271270 async def execute_plan (self ):
272271 await self ._resolve_charms ()
273272
@@ -285,11 +284,11 @@ def applications(self):
285284 apps_dict = self .bundle .get ('applications' ,
286285 self .bundle .get ('services' , {}))
287286 return list (apps_dict .keys ())
288-
287+
289288 @property
290289 def applications_specs (self ):
291290 return self .bundle .get ('applications' ,
292- self .bundle .get ('services' , {}))
291+ self .bundle .get ('services' , {}))
293292
294293 def resolve_relation (self , reference ):
295294 parts = reference .split (":" , maxsplit = 1 )
@@ -307,7 +306,7 @@ def resolve(self, reference):
307306
308307
309308def is_local_charm (charm_url ):
310- return charm_url .startswith ('.' ) or charm_url .startswith ('local:' )
309+ return charm_url .startswith ('.' ) or charm_url .startswith ('local:' )
311310
312311
313312def get_charm_series (path ):
@@ -584,7 +583,7 @@ async def run(self, context):
584583 arch = self .architecture
585584 if not arch :
586585 arch = await context .model ._resolve_architecture (url )
587- origin = client .CharmOrigin (source = "charm-hub" ,
586+ origin = client .CharmOrigin (source = "charm-hub" ,
588587 architecture = arch ,
589588 risk = ch .risk ,
590589 track = ch .track )
0 commit comments