From d2dd88a346aa527824e510a2a5618db2e82616d6 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 3 May 2014 08:48:59 -0400 Subject: Small cleanups --- coverage/control.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index 07551ff1..44a70bf0 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -214,7 +214,8 @@ class coverage(object): def _canonical_dir(self, morf): """Return the canonical directory of the module or file `morf`.""" - return os.path.split(PythonCodeUnit(morf, self.file_locator).filename)[0] + morf_filename = PythonCodeUnit(morf, self.file_locator).filename + return os.path.split(morf_filename)[0] def _source_for_file(self, filename): """Return the source file for `filename`.""" -- cgit v1.2.1