Skip to content

Commit 35e96dd

Browse files
committed
Add charm_name property to Application
Fixes #888
1 parent d9df8ad commit 35e96dd

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

juju/application.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,19 @@ async def run(self, command, timeout=None):
547547
units=[],
548548
)
549549

550+
@property
551+
def charm_name(self):
552+
"""Get the charm name of this application
553+
554+
:return str: The name of the charm
555+
"""
556+
return URL.parse(self.charm_url).name
557+
550558
@property
551559
def charm_url(self):
552-
"""Get the charm url for a given application
560+
"""Get the charm url for this application
553561
554-
:return string: The charm url for an application
562+
:return str: The charm url
555563
"""
556564
return self.safe_data['charm-url']
557565

0 commit comments

Comments
 (0)