~lool/linaro-image-tools/igep-support

« back to all changes in this revision

Viewing changes to linaro_media_create/cmd_runner.py

  • Committer: Loïc Minier
  • Date: 2011-03-10 23:37:08 UTC
  • mfrom: (287.1.9 trunk)
  • Revision ID: lool@dooz.org-20110310233708-tjeezguoaeo860ix
Merge with lp:linaro-image-tools; rework tests for new bootcmd/bootargs dict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    assert isinstance(args, (list, tuple)), (
39
39
        "The command to run must be a list or tuple, found: %s" % type(args))
40
40
    if as_root and os.getuid() != 0:
41
 
        args = args[:]
42
 
        # TODO: We might want to always use 'sudo -E' here to avoid problems
43
 
        # like https://launchpad.net/bugs/673570
44
 
        args.insert(0, 'sudo')
 
41
        args = ['sudo', '-E'] + args
45
42
    return Popen(args, stdin=stdin, stdout=stdout, stderr=stderr)
46
43
 
47
44