Skip to content

Commit 38979d7

Browse files
[JUJU-2391] Fix wrong bases analysis. (#782)
* Fix wrong bases analysis. * Add explicit dependencies in tox.ini as the new tox doesn't install Co-authored-by: Caner Derici <caner.derici@canonical.com>
1 parent 88eb6c4 commit 38979d7

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

docs/readme.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Documentation: https://pythonlibjuju.readthedocs.io/en/latest/
1111
Requirements
1212
------------
1313

14-
* Python 3.6+
15-
* Juju 2.0+
14+
* Python 3.8/3.9/3.10
15+
* Tested using Juju 3.0.2
1616

1717

1818
Design Notes

juju/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ def get_local_charm_base(series, channel_from_arg, charm_metadata,
385385
else:
386386
# Also check the charmcraft.yaml
387387
charmcraft_yaml = get_local_charm_charmcraft_yaml(charm_path)
388-
if 'bases' in charmcraft_yaml:
389-
channel_for_base = charmcraft_yaml['bases'][0]['run-on'][0]['channel']
390-
os_name_for_base = charmcraft_yaml['bases'][0]['run-on'][0]['name']
388+
if 'bases' in charmcraft_yaml:
389+
channel_for_base = charmcraft_yaml['bases'][0]['run-on'][0]['channel']
390+
os_name_for_base = charmcraft_yaml['bases'][0]['run-on'][0]['name']
391391

392392
if channel_for_base == '':
393393
raise errors.JujuError("Unable to determine base for charm : %s" %

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ passenv =
2626
TEST_AGENTS
2727
LXD_DIR
2828
deps =
29+
macaroonbakery
30+
theblues
31+
toposort
32+
typing-inspect
33+
paramiko
2934
asynctest
3035
ipdb
3136
mock

0 commit comments

Comments
 (0)