From ca0abeea612c9ec48d54414b5fc75152a4ba9055 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 19 Jun 2014 18:45:52 +0200 Subject: Use devops slang --- stagepkg/command.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/stagepkg/command.py b/stagepkg/command.py index 3bc8923..5c6ce5e 100644 --- a/stagepkg/command.py +++ b/stagepkg/command.py @@ -225,17 +225,17 @@ def parachute(from_repo, to_repo): raise ValueError("Target repository has no '/'") if from_suite != to_suite: raise ValueError("Source suite '%s' is different from destination suite '%s'" % (from_suite, to_suite)) - from_level = from_comp.split("-")[-1] - to_level = to_comp.split("-")[-1] - if to_level not in order: - to_level = "stable" - if from_level not in order: - from_level = "stable" - if from_level == "stable": + from_stage = from_comp.split("-")[-1] + to_stage = to_comp.split("-")[-1] + if to_stage not in order: + to_stage = "stable" + if from_stage not in order: + from_stage = "stable" + if from_stage == "stable": raise ValueError("Refusing to remove out of a stable archive") - index = order.index(from_level)+1 - if order[index] != to_level: - raise ValueError("'%s' is not the next step after '%s'" % (to_level, from_level)) + index = order.index(from_stage)+1 + if order[index] != to_stage: + raise ValueError("'%s' is not the next step after '%s'" % (to_stage, from_stage)) except ValueError as e: print >>sys.stderr, "%s - use --force to override" % e return False -- cgit v1.2.3