summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-11 20:24:18 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-11 20:24:18 -0500
commitb17375c5ee16e21dc4e3c5e95b5da3d980489ec3 (patch)
treeac88ac3d26e3231bdccba49d00239ebddf9fa459 /coverage/control.py
parente50f19f505a76d91b569e61817d9c1aca97a7af4 (diff)
downloadpython-coveragepy-b17375c5ee16e21dc4e3c5e95b5da3d980489ec3.tar.gz
Remove odd module holding, since I think this is now fixed by always stopping the tracers.
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/coverage/control.py b/coverage/control.py
index effb485..20afff5 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -179,14 +179,6 @@ class coverage(object):
# Set the reporting precision.
Numbers.set_precision(self.config.precision)
- # When tearing down the coverage object, modules can become None.
- # Saving the modules as object attributes avoids problems, but it is
- # quite ad-hoc which modules need to be saved and which references
- # need to use the object attributes.
- self.socket = socket
- self.os = os
- self.random = random
-
def _canonical_dir(self, f):
"""Return the canonical directory of the file `f`."""
return os.path.split(self.file_locator.canonical_filename(f))[0]
@@ -208,9 +200,6 @@ class coverage(object):
should not.
"""
- if os is None:
- return False
-
if filename.startswith('<'):
# Lots of non-file execution is represented with artificial
# filenames like "<string>", "<doctest readme.txt[0]>", or
@@ -426,8 +415,8 @@ class coverage(object):
# `save()` at the last minute so that the pid will be correct even
# if the process forks.
data_suffix = "%s.%s.%06d" % (
- self.socket.gethostname(), self.os.getpid(),
- self.random.randint(0, 99999)
+ socket.gethostname(), os.getpid(),
+ random.randint(0, 99999)
)
self._harvest_data()