Skip to content

Commit 9965f6e

Browse files
Adding profiler unit tests
1 parent c8f3139 commit 9965f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cylc/flow/scripts/profiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import signal
2828
from pathlib import Path
2929
from dataclasses import dataclass
30-
from typing import Callable, Optional
3130
from cylc.flow.terminal import cli_function
3231
from cylc.flow.option_parsers import CylcOptionParser as COP
3332

@@ -125,7 +124,8 @@ def get_cgroup_name():
125124
result = PID_REGEX.search(result).group()
126125
return result
127126
except FileNotFoundError as err:
128-
raise FileNotFoundError('/proc/' + str(pid) + '/cgroup not found')
127+
raise FileNotFoundError(
128+
'/proc/' + str(pid) + '/cgroup not found') from err
129129

130130
except AttributeError as err:
131131
raise AttributeError("No cgroup found for process:", pid) from err

0 commit comments

Comments
 (0)