Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
Fix KeyError when running local quickstart for the first time
Browse files Browse the repository at this point in the history
This was due to incorrect parsing of the version number.
  • Loading branch information
regisb committed Jun 15, 2020
1 parent 4d6de01 commit 06fe19f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Note: Breaking changes between versions are indicated by "💥".

## Unreleased

- [Bugfix] Fix KeyError when running ``local quickstart`` for the first time

## v10.0.0 (2020-06-15)

- 💥[Improvement] Upgrade to Juniper 🍾
Expand Down
6 changes: 4 additions & 2 deletions tutor/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,16 @@ def needs_major_upgrade(root):
"""
current = int(current_version(root).split(".")[0])
required = int(__version__.split(".")[0])
return current < required
return 0 < current < required


def current_release(root):
"""
Return the name of the current Open edX release.
"""
return {"3": "ironwood", "10": "juniper"}[current_version(root).split(".")[0]]
return {"0": "ironwood", "3": "ironwood", "10": "juniper"}[
current_version(root).split(".")[0]
]


def current_version(root):
Expand Down

0 comments on commit 06fe19f

Please sign in to comment.