aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-06-19 18:45:52 +0200
committerGuido Günther <agx@sigxcpu.org>2014-06-19 19:27:42 +0200
commitca0abeea612c9ec48d54414b5fc75152a4ba9055 (patch)
tree7935e3380cbcc0b3c22a39f8e056723b2989cf3a
parentc7b68e963c77e4055a2b8fce6ca05d070e47b8e6 (diff)
Use devops slang
-rw-r--r--stagepkg/command.py20
1 files 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