Merge ~smoser/cloud-init:bug/ds-identify-none-twice into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 32b21ee7245bf00d55f875506ffc149aad9bb546
Proposed branch: ~smoser/cloud-init:bug/ds-identify-none-twice
Merge into: cloud-init:master
Diff against target: 15 lines (+3/-1)
1 file modified
tools/ds-identify (+3/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Needs Fixing
Dan Watkins Approve
cloud-init Commiters Pending
Review via email: mp+321208@code.launchpad.net

Commit message

ds-identify: do not write None twice to datasource_list.

If the only the None datasource was listed in datasource_list, then
ds-identify would write a cloud.cfg witih:
 datasource_list: [None, None]

The fix is to just append None if the list only has None.

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 Watkins (oddbloke) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/tools/ds-identify b/tools/ds-identify
index 3010634..54bd999 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -954,7 +954,9 @@ found() {
954 shift954 shift
955 fi955 fi
956 # always write the None datasource last.956 # always write the None datasource last.
957 list="${list:+${list}, }None"957 if [ "$list" != "None" ]; then
958 list="${list:+${list}, }None"
959 fi
958 write_result "datasource_list: [ $list ]" "$@"960 write_result "datasource_list: [ $list ]" "$@"
959 return961 return
960}962}

Subscribers

People subscribed via source and target branches