~smoser/ubuntu/quantal/cloud-init/sru

« back to all changes in this revision

Viewing changes to cloudinit/DataSourceOVF.py

  • Committer: Scott Moser
  • Date: 2012-01-12 16:33:53 UTC
  • mto: This revision was merged to the branch mainline in revision 141.
  • Revision ID: smoser@ubuntu.com-20120112163353-nip749m6ytls8sva
Tags: upstream-0.6.3~bzr502
ImportĀ upstreamĀ versionĀ 0.6.3~bzr502

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import sys
24
24
import os.path
25
25
import os
26
 
import errno
27
26
from xml.dom import minidom
28
 
from xml.dom import Node
29
27
import base64
30
28
import re
31
29
import tempfile
66
64
            np = { 'iso' : transport_iso9660, 
67
65
                   'vmware-guestd' : transport_vmware_guestd, }
68
66
            for name, transfunc in np.iteritems():
69
 
                (contents, dev, fname) = transfunc()
 
67
                (contents, _dev, _fname) = transfunc()
70
68
                if contents: break
71
69
 
72
70
            if contents:
73
71
                (md, ud, cfg) = read_ovf_environment(contents)
74
72
                self.environment = contents
75
 
                found.append(name)
 
73
                found.append(name)  # pylint: disable=W0631
76
74
 
77
75
        # There was no OVF transports found
78
76
        if len(found) == 0:
99
97
 
100
98
        md = util.mergedict(md,defaults)
101
99
        self.seed = ",".join(found)
102
 
        self.metadata = md;
 
100
        self.metadata = md
103
101
        self.userdata_raw = ud
104
102
        self.cfg = cfg
105
103
        return True
173
171
 
174
172
    mounted = { }
175
173
    for mpline in mounts:
176
 
        (dev,mp,fstype,opts,freq,passno) = mpline.split()
 
174
        (dev,mp,fstype,_opts,_freq,_passno) = mpline.split()
177
175
        mounted[dev]=(dev,fstype,mp,False)
178
176
        mp = mp.replace("\\040"," ")
179
177
        if fstype != "iso9660" and require_iso: continue