Merge ~mwhudson/curtin:swap-exit into curtin:master

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Dan Bungert
Approved revision: 9ccf75c478e96802da41c2e4392c093bff7e2474
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~mwhudson/curtin:swap-exit
Merge into: curtin:master
Diff against target: 13 lines (+1/-1)
1 file modified
curtin/commands/swap.py (+1/-1)
Reviewer Review Type Date Requested Status
Dan Bungert Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+433683@code.launchpad.net

Commit message

fix "curtin swap" exit code

Today I discovered that there is a "curtin swap" command that just does
the "configure swap" part of curthooks and then I fairly quickly after
that discovered that probably noone has used it because it
unconditionally exits with code 2 even if everything succeeded.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Dan Bungert (dbungert) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/curtin/commands/swap.py b/curtin/commands/swap.py
index 089cd73..a5082ac 100644
--- a/curtin/commands/swap.py
+++ b/curtin/commands/swap.py
@@ -41,7 +41,7 @@ def swap_main(args):
41 swap.setup_swapfile(target=state['target'], fstab=state['fstab'],41 swap.setup_swapfile(target=state['target'], fstab=state['fstab'],
42 swapfile=args.swapfile, size=size,42 swapfile=args.swapfile, size=size,
43 maxsize=args.maxsize, force=args.force)43 maxsize=args.maxsize, force=args.force)
44 sys.exit(2)44 sys.exit(0)
4545
4646
47CMD_ARGUMENTS = (47CMD_ARGUMENTS = (

Subscribers

People subscribed via source and target branches