Merge lp:~javier.collado/utah/bug1087237 into lp:utah

Proposed by Javier Collado
Status: Merged
Merged at revision: 773
Proposed branch: lp:~javier.collado/utah/bug1087237
Merge into: lp:utah
Diff against target: 16 lines (+4/-2)
1 file modified
utah/iso.py (+4/-2)
To merge this branch: bzr merge lp:~javier.collado/utah/bug1087237
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Dimitri John Ledkov (community) Approve
Review via email: mp+138511@code.launchpad.net

Description of the change

This change updates the extraction of the kernel path, to make sure it skips
lines that don't start with 'kernel' or 'linux', but have any of these words
somewhere else.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Two thumbs up!

review: Approve
Revision history for this message
Max Brustkern (nuclearbob) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/iso.py'
2--- utah/iso.py 2012-12-05 19:04:01 +0000
3+++ utah/iso.py 2012-12-06 17:11:24 +0000
4@@ -370,8 +370,10 @@
5 if cfgfile in self.listfiles(returnlist=True):
6 stdout = self.dump(cfgfile).communicate()[0]
7 for line in stdout.splitlines():
8- if 'kernel' in line or 'linux' in line:
9- newkernel = line.split()[1].strip('./')
10+ fragments = line.split()
11+ if (len(fragments) >= 2 and
12+ fragments[0] in ('kernel', 'linux')):
13+ newkernel = fragments[1].strip('./')
14 if 'mt86plus' in newkernel:
15 self.logger.debug('Rejecting '
16 'memtest kernel')

Subscribers

People subscribed via source and target branches