~ubuntu-branches/ubuntu/wily/ubuntu-core-upgrader/wily-proposed

« back to all changes in this revision

Viewing changes to ubuntucoreupgrader/apply.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2015-06-17 15:44:49 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20150617154449-jhms1hrtl29athy9
Tags: 0.7.12
* ubuntucoreupgrader/apply.py:
  - always send json progress on stdout to have progress for
    snapyp with s-i 3.0 that does not store the progress information
    in its global config

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        stdout = ""
40
40
        while p.poll() is None:
41
41
            # send alive ping
42
 
            if getattr(config, "machine_readable", False):
43
 
                # ensure its written out
44
 
                sys.stdout.write(json.dumps({"type": "spinner",
45
 
                                             "msg": "Applying update"})+"\n")
46
 
                sys.stdout.flush()
 
42
            sys.stdout.write(json.dumps({"type": "spinner",
 
43
                                         "msg": "Applying update"})+"\n")
 
44
            sys.stdout.flush()
47
45
            if select.select([p.stdout.fileno()], [], [], 0.1) != ([], [], []):
48
46
                stdout += p.stdout.read(1).decode("utf-8", errors="replace")
49
47
        # get return code