Skip to content

Commit

Permalink
path check
Browse files Browse the repository at this point in the history
  • Loading branch information
ring04h committed Nov 1, 2016
1 parent 5b1fa47 commit 1e53da2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ def curl_get_content(url):
pass

def save_result(filename, args):
if FileUtils.exists(filename):
try:
fd = open(filename, 'w')
json.dump(args, fd, indent=4)
finally:
fd.close()
try:
fd = open(filename, 'w')
json.dump(args, fd, indent=4)
finally:
fd.close()

def read_json(filename):
if FileUtils.exists(filename):
Expand Down

0 comments on commit 1e53da2

Please sign in to comment.