~nick-schutt/lava-dispatcher/nicks-bootloader-interactive

« back to all changes in this revision

Viewing changes to lava_dispatcher/device/master.py

  • Committer: Nick Schutt
  • Date: 2013-05-03 11:59:39 UTC
  • Revision ID: nick.schutt@linaro.org-20130503115939-3ofsa8sp2qs1a2kx
read file and strip newlines in one line

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
            return
219
219
        sdir = self.scratch_dir
220
220
        bootcmd_file = download_image(cmdfile, self.context, sdir, decompress=True)
221
 
        with open(bootcmd_file) as f:
222
 
            boot_file = f.readlines()
223
 
            boot_cmds_from_file = []
224
 
            for i in range(len(boot_file)):
225
 
                boot_cmds_from_file.append(boot_file[i].rstrip('\n'))
226
 
            self.deployment_data[keyname] = boot_cmds_from_file
 
221
        self.deployment_data[keyname] = [line.strip() for line in open(bootcmd_file)]
227
222
    
228
223
    def _read_boot_cmds(self, image=None, boot_tgz=None):
229
224
        boot_file_path = None