Skip to content

Commit

Permalink
added closing for arg layout reading
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrasmus committed Sep 12, 2013
1 parent 88750fc commit ee6e348
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion argweaver/vis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

from contextlib import closing
import os
import subprocess

Expand Down Expand Up @@ -135,7 +136,7 @@ def iter_arg_layout(filename):
"""
Iterate through an ARG layout file.
"""
with argweaver.open_stream(filename, compress='bgzip') as infile:
with closing(argweaver.open_stream(filename, compress='bgzip')) as infile:
for line in infile:
tokens = line.rstrip().split("\t")
block = [tokens[0], int(tokens[1]), int(tokens[2])]
Expand Down
4 changes: 2 additions & 2 deletions bin/arg-serve
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,6 @@ util.toc()


if conf.pub:
run(host='', port=8080)
run(host='', port=conf.port)
else:
run(host='localhost', port=8080)
run(host='localhost', port=conf.port)

0 comments on commit ee6e348

Please sign in to comment.