From 06fe19fcf29c8c50c048cbaba923b36effc26e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 15 Jun 2020 17:57:14 +0200 Subject: [PATCH] Fix KeyError when running ``local quickstart`` for the first time This was due to incorrect parsing of the version number. --- CHANGELOG.md | 4 ++++ tutor/env.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e9656..cf471e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 🍾 diff --git a/tutor/env.py b/tutor/env.py index e7bb3cb..b396116 100644 --- a/tutor/env.py +++ b/tutor/env.py @@ -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):