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
commit7fda5e935bb78af2fbc2ff01731d2adb8f6af848 (patch)
tree5e2b8f9ff19e042f3ec0929fcf6a09ddebc4c38b /coverage/control.py
parent199b060ac815c5125e8c8955d4d1fe5d273b641b (diff)
downloadpython-coveragepy-git-7fda5e935bb78af2fbc2ff01731d2adb8f6af848.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 effb4857..20afff5e 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()