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

Proposed by Javier Collado
Status: Merged
Merged at revision: 689
Proposed branch: lp:~javier.collado/utah/bug1060871
Merge into: lp:utah
Diff against target: 16 lines (+1/-1)
1 file modified
utah/provisioning/provisioning.py (+1/-1)
To merge this branch: bzr merge lp:~javier.collado/utah/bug1060871
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
UTAH Dev Pending
Review via email: mp+127713@code.launchpad.net

Description of the change

The question variable was assigned inside and `if` but used in the `else` clause as
well. This fix moves the assignment to the line before the `if/else`.

(It's strange that static analysis tools don't catch this kind of bugs)

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

This resolves the issue I was having. I'll merge it and get back to hunting down that download problem. I'm going to try changing the commands we use to install things in the preseed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/provisioning/provisioning.py'
2--- utah/provisioning/provisioning.py 2012-09-06 11:41:21 +0000
3+++ utah/provisioning/provisioning.py 2012-10-03 10:55:45 +0000
4@@ -775,11 +775,11 @@
5 tmpdir = self.tmpdir
6 preseed = Preseed(self.preseed)
7 if 'preseed/late_command' in preseed:
8+ question = preseed['preseed/late_command']
9 if self.installtype == 'desktop':
10 self.logger.info('Changing d-i latecommand '
11 + 'to ubiquity success_command '
12 + 'and prepending ubiquity lines')
13- question = preseed['preseed/late_command']
14 question.owner = 'ubiquity'
15 question.qname = 'ubiquity/success_command'
16 question.value.prepend(

Subscribers

People subscribed via source and target branches