Skip to content

Commit 02e07bc

Browse files
Send empty channel
The following sends an empty channel instead of guessing, so that the controller can correctly determine the right channel for hinting.
1 parent 9016398 commit 02e07bc

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
Example to show how to connect to the current model and query the charm-hub
3-
store for information about a given charm.
3+
repository for information about a given charm.
44
"""
55
import logging
66

juju/charmhub.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ def __init__(self, model):
88

99
async def info(self, name, channel=None):
1010
"""info displays detailed information about a CharmHub charm. The charm
11-
can be specified by name or by path.
11+
can be specified by the exact name.
12+
13+
Channel is a hint for providing the metadata for a given channel.
14+
Without the channel hint then only the default release will have the
15+
metadata.
1216
1317
"""
1418
if not name:
1519
raise JujuError("name expected")
1620

1721
if channel is None:
18-
channel = "latest"
22+
channel = ""
1923

2024
facade = self._facade()
2125
return await facade.Info(tag="application-{}".format(name), channel=channel)

juju/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ def relations(self):
779779

780780
@property
781781
def charmhub(self):
782-
"""Return a charmhub store for requesting charm information using
782+
"""Return a charmhub repository for requesting charm information using
783783
the charm-hub-url model config.
784784
785785
"""

0 commit comments

Comments
 (0)