Skip to content

Commit

Permalink
Changed to better name for output file function
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallmcdonnell committed Feb 11, 2019
1 parent 5a3342c commit e0fcbe3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addie/step2_handler/generate_sumthing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def is_sum_inp_file_not_empty(self):
return False
return True

def check_for_write_permissions(self, full_output_file_name):
def open_output_file_if_writable(self, full_output_file_name):
_o_file = FileHandler(filename=full_output_file_name)
if _o_file.is_file_writable():
outfile = open(full_output_file_name, "w")
Expand Down Expand Up @@ -116,7 +116,7 @@ def create_sum_inp_file_from_new_format(self, full_input_file_name):
name_list.append(word)

full_output_file_name = os.path.join(self.folder, self.output_inp_file)
outfile = self.check_for_write_permissions(full_output_file_name)
outfile = self.open_output_file_if_writable(full_output_file_name)

if outfile:
self.write_outfile(outfile, run_nums)
Expand Down Expand Up @@ -151,7 +151,7 @@ def create_sum_inp_file_from_old_format(self, full_input_file_name):
full_output_file_name = os.path.join(self.folder, self.output_inp_file)

full_output_file_name = os.path.join(self.folder, self.output_inp_file)
outfile = self.check_for_write_permissions(full_output_file_name)
outfile = self.open_output_file_if_writable(full_output_file_name)

if outfile:
self.write_outfile(outfile, run_nums)
Expand Down

0 comments on commit e0fcbe3

Please sign in to comment.