From 24789ba35ae307650316b769eba7e68faa07546b Mon Sep 17 00:00:00 2001 From: blendoit Date: Thu, 17 Oct 2019 16:21:27 -0700 Subject: evaluator tree_print method --- evaluator/evaluator.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'evaluator/evaluator.py') diff --git a/evaluator/evaluator.py b/evaluator/evaluator.py index d4088b6..a668854 100644 --- a/evaluator/evaluator.py +++ b/evaluator/evaluator.py @@ -204,8 +204,8 @@ class Evaluator: # return None def tree_print(self): - """Print a list of subcomponents.""" - name = f" COMPONENT TREE FOR {[_.name for _ in self.aircrafts]} " + """Print the list of subcomponents.""" + name = f" TREE FOR {[_.name for _ in self.aircrafts]} IN {self.name} " num_of_dashes = len(name) print(num_of_dashes * '-') print(name) @@ -243,14 +243,6 @@ class Evaluator: print(f'Unable to write {file_name} to specified directory.\n', 'Was the full path passed to the function?') return None - try: - with open(full_path, 'w') as sys.stdout: - print('Successfully wrote to file {}'.format(full_path)) - except IOError: - print( - 'Unable to write {} to specified directory.\n'.format( - file_name), 'Was the full path passed to the function?') - return None def info_save(self, save_path, number): """Save all the object's coordinates (must be full path).""" -- cgit v1.2.3