| Index: third_party/coverage-3.7.1/coverage/data.py
|
| diff --git a/third_party/coverage-3.6/coverage/data.py b/third_party/coverage-3.7.1/coverage/data.py
|
| similarity index 95%
|
| rename from third_party/coverage-3.6/coverage/data.py
|
| rename to third_party/coverage-3.7.1/coverage/data.py
|
| index c86a77f2f3a6aee460a42a70f137c6f9373686b7..fb88c5b1e638cdd5954c3818a08d000a4ec499eb 100644
|
| --- a/third_party/coverage-3.6/coverage/data.py
|
| +++ b/third_party/coverage-3.7.1/coverage/data.py
|
| @@ -23,15 +23,18 @@ class CoverageData(object):
|
|
|
| """
|
|
|
| - def __init__(self, basename=None, collector=None):
|
| + def __init__(self, basename=None, collector=None, debug=None):
|
| """Create a CoverageData.
|
|
|
| `basename` is the name of the file to use for storing data.
|
|
|
| `collector` is a string describing the coverage measurement software.
|
|
|
| + `debug` is a `DebugControl` object for writing debug messages.
|
| +
|
| """
|
| self.collector = collector or 'unknown'
|
| + self.debug = debug
|
|
|
| self.use_file = True
|
|
|
| @@ -121,6 +124,9 @@ class CoverageData(object):
|
| if self.collector:
|
| data['collector'] = self.collector
|
|
|
| + if self.debug and self.debug.should('dataio'):
|
| + self.debug.write("Writing data to %r" % (filename,))
|
| +
|
| # Write the pickle to the file.
|
| fdata = open(filename, 'wb')
|
| try:
|
| @@ -134,6 +140,8 @@ class CoverageData(object):
|
|
|
| def raw_data(self, filename):
|
| """Return the raw pickled data from `filename`."""
|
| + if self.debug and self.debug.should('dataio'):
|
| + self.debug.write("Reading data from %r" % (filename,))
|
| fdata = open(filename, 'rb')
|
| try:
|
| data = pickle.load(fdata)
|
|
|