Skip to content
Snippets Groups Projects
Commit 5cb2c2a3 authored by Christoph Heidecker's avatar Christoph Heidecker
Browse files

* Fixed crashing caused by empty input_files

parent 42a56173
Branches
No related tags found
No related merge requests found
......@@ -117,7 +117,8 @@ class EvaluateMonitoring:
def get_total_file_size(self):
try:
self.df['total_file_size'] = self.df['input_files'].apply(lambda file_list: sum(map(
lambda x: float(x.rsplit(":", 1)[1]) / (1024 * 1024), eval(file_list))))
lambda x: float(x.rsplit(":", 1)[1]) / (1024 * 1024) if x != '' else np.nan, eval(file_list))))
except Exception as e:
print_with_color("Python-Error: " + str(e) + "\nFailed to calculate total file size requested by jobs!",
color='red')
......@@ -243,7 +244,8 @@ class EvaluateMonitoring:
# get file size at the end of the list entry
self.df_file['size'] = self.df_file['size'].apply(
lambda x: float(x[0].rsplit(":", 1)[1]) / (1024 * 1024))
lambda x: float(x[0].rsplit(":", 1)[1]) / (1024 * 1024) if x != [] else np.nan)
except Exception as e:
print_with_color("Python-Error: " + str(e) + "\nFailed to calculate file duplicity and size!", color='red')
exit(-1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment