/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/strace.py

Merge test-run support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    # capture strace output to a file
46
46
    log_file = tempfile.NamedTemporaryFile()
 
47
    log_file_fd = log_file.fileno()
47
48
    err_file = tempfile.NamedTemporaryFile()
48
49
    pid = os.getpid()
49
50
    # start strace
56
57
                            stdout=subprocess.PIPE,
57
58
                            stderr=err_file.fileno())
58
59
    # Wait for strace to attach
59
 
    proc.stdout.readline()
 
60
    attached_notice = proc.stdout.readline()
60
61
    # Run the function to strace
61
62
    result = function(*args, **kwargs)
62
63
    # stop strace
77
78
 
78
79
 
79
80
class StraceError(errors.BzrError):
80
 
 
 
81
    
81
82
    _fmt = "strace failed: %(err_messages)s"
82
83
 
83
84
 
91
92
        """
92
93
        self.raw_log = raw_log
93
94
        self.err_messages = err_messages
 
95
 
 
96