From 21ff11a1e12f4b387ca718eff607f2d93565ec33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Wed, 5 Feb 2020 20:29:31 +0000 Subject: [PATCH] MAINT: remove unused function --- src/caosdb/common/models.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index bf047f03..28dc6997 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -605,36 +605,6 @@ class Entity(object): return result_list - def print_error_tree(self, error_tree=None, print_out=True): - """Print an error tree created with get_errors_deep. Set print_out to - False if you just want to have the resulting string returned. - - If error_tree is set to None, call get_errors_deep and print the - resulting tree. - """ - - if error_tree is None: - error_tree = self.get_errors_deep() - text = "" - - for i in error_tree: - text += "ERROR " + str(i[0].code) + \ - ": " + str(i[0].description) + "\n" - - for tree_entry in reversed(i[1]): - # print(tree_entry) - text += " in " + str(tree_entry.__class__) + \ - " " + str(tree_entry.type) + \ - ": " + str(tree_entry.name) + " (ID: " + \ - str(tree_entry.id) + ")" - text += "\n" - text += "\n" - - if print_out: - print(text) - - return text - def has_errors(self): ''' @return True: if and only if this entities has any error messages. -- GitLab