Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Use another open() call as a context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mruffalo committed Aug 13, 2013
1 parent 29f3ec7 commit c5a0108
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyfasta/records.py
Expand Up @@ -85,9 +85,8 @@ def copy_inplace(klass, flat_name, fasta_name):
os.rename(flat_name, fasta_name)
# still need the flattend file to show
# it's current.
flatfh = open(fasta_name + klass.ext, 'w')
flatfh.write(MAGIC)
flatfh.close()
with open(fasta_name + klass.ext, 'w') as flatfh:
flatfh.write(MAGIC)



Expand Down

0 comments on commit c5a0108

Please sign in to comment.