From 84a12754a153948bafd31807998f49bf449d2842 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 13 Dec 2018 12:23:05 -0500 Subject: [PATCH] FIX: Set ResourceMonitor.fname to an absolute path Fixes #2764. --- nipype/utils/profiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nipype/utils/profiler.py b/nipype/utils/profiler.py index d8ec32ffe3..6380711baf 100644 --- a/nipype/utils/profiler.py +++ b/nipype/utils/profiler.py @@ -7,6 +7,7 @@ from __future__ import (print_function, division, unicode_literals, absolute_import) +import os import threading from time import time try: @@ -40,7 +41,7 @@ def __init__(self, pid, freq=5, fname=None, python=True): if fname is None: fname = '.proc-%d_time-%s_freq-%0.2f' % (pid, time(), freq) - self._fname = fname + self._fname = os.path.abspath(fname) self._logfile = open(self._fname, 'w') self._freq = freq self._python = python