From f6a1c786fb3513a7a8f7d608a7639c2ce1211f3b Mon Sep 17 00:00:00 2001 From: Alexander Veit <53857412+alexander-veit@users.noreply.github.com> Date: Tue, 6 Aug 2024 13:10:14 -0400 Subject: [PATCH] Fix top parse --- CHANGELOG.rst | 6 ++++++ pyproject.toml | 2 +- tibanna/top.py | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 73b5526f..89277ff2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,12 @@ Change Log ========== +5.4.3 +===== + +* Fix bug when parsing output from top command + + 5.4.2 ===== diff --git a/pyproject.toml b/pyproject.toml index 55d6e95c..1701cf84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tibanna" -version = "5.4.2" +version = "5.4.3" description = "Tibanna runs portable pipelines (in CWL/WDL) on the AWS Cloud." authors = ["4DN-DCIC Team "] license = "MIT" diff --git a/tibanna/top.py b/tibanna/top.py index 2a90a42c..2bcefb77 100644 --- a/tibanna/top.py +++ b/tibanna/top.py @@ -93,7 +93,9 @@ def parse_contents(self, contents): is_in_table = False for line in contents.splitlines(): if line.startswith('Timestamp:'): - timestamp = line.split()[1] + line_split = line.split() + if len(line_split) > 1: + timestamp = line_split[1] continue if line.lstrip().startswith('PID'): is_in_table = True