diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index 1b037299a878f638c2d18458fdc19aab4850acb8..e58b57f382ffd4d14d5319aa289ce74cb8df4660 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -604,36 +604,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.