Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from kristopherkane/master

Change file handle for legacy
  • Loading branch information...
commit 843ca6056b0e3e50df7b6366a6bf2bb47a2c7a70 2 parents 3b14bf9 + 55de968
@phunt authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 zktop.py
View
5 zktop.py
@@ -329,8 +329,11 @@ def sigwinch_handler(*nada):
resized_sig = True
def read_zk_config(filename):
- with open(filename) as f:
+ f = open(filename, 'r')
+ try:
config = dict(tuple(line.rstrip().split('=', 1)) for line in f if line.rstrip())
+ finally:
+ f.close()
return config
def get_zk_servers(filename):
Please sign in to comment.
Something went wrong with that request. Please try again.