~brendan-donegan/checkbox/bug1013537_nmcli_con_up_return_code

« back to all changes in this revision

Viewing changes to checkbox/lib/fifo.py

  • Committer: Daniel Manrique
  • Date: 2012-06-09 04:10:34 UTC
  • mfrom: (1421.1.2 proxy)
  • Revision ID: daniel.manrique@canonical.com-20120609041034-41sqecv7u4023d05
Merged fix to http proxies and revert of FIFO opening modes which don't work as they are, by Marc Tardif

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
class FifoReader(FifoBase):
55
55
 
56
 
    # In this case we want to read from the FIFO, but opening it in
57
 
    # read-write mode (as opposed to read-only) is done specifically
58
 
    # so that the frontend can open the FIFO without blocking until the
59
 
    # backend starts; so that the frontend can wait a reasonable amount
60
 
    # of time and then, if it hasn't received a reply from the backend,
61
 
    # it can continue execution. This is done to prevent the frontend
62
 
    # blocking forever if the user e.g. fails to input the password and
63
 
    # the backend doesn't start (LP#588539).
64
 
    mode = "r+b"
 
56
    # TODO: Not being able to read-write will cause the frontend to
 
57
    # block forever if the user e.g. fails to input the password and the
 
58
    # backend doesn't start (LP#588539).
 
59
    mode = "rb"
65
60
 
66
61
    def read_bytes(self):
67
62
        # Check if a connection arrived within the timeout
87
82
class FifoWriter(FifoBase):
88
83
 
89
84
    # See FifoReader.mode.
90
 
    mode = "w+b"
 
85
    mode = "wb"
91
86
 
92
87
    def write_bytes(self, _bytes):
93
88