~jordanu/testdrive/grub-new

« back to all changes in this revision

Viewing changes to testdrive.py

  • Committer: Andres Rodriguez
  • Date: 2010-05-28 19:38:15 UTC
  • Revision ID: andreserl@ubuntu.com-20100528193815-snkxc21xzbcwj5sf
Fix launching fail when attribute m is not set. (LP: #585792)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                self.PKGRC = "%src" % self.PKG
42
42
                self.r = None
43
43
                self.PROTO = None
 
44
                self.m = None
44
45
 
45
46
        def set_values(self, var, value):
46
47
                if var == 'kvm_args':
79
80
 
80
81
        ## TODO: This possible needs to go outside the class due to in PyGTK front end we might need the list of ISO's before even instancing an object
81
82
        def list_isos(self):
82
 
                if platform.machine() == "x86_64":
83
 
                        self.m = ["amd64", "i386"]
 
83
                if self.m is None:
 
84
                        # Set defaults here due to the ISO list is generated before loading defaults.
 
85
                        if platform.machine() == "x86_64":
 
86
                                self.m = ["amd64", "i386"]
 
87
                        else:
 
88
                                self.m = ["i386"]
84
89
                ISO = []
85
90
                for a in self.m:
86
91
                        ISO.append({"name":"Ubuntu Desktop (%s-%s)"%(self.r,a), "url":"%s/daily-live/current/%s-desktop-%s.iso"%(self.u,self.r,a)})