Skip to content

Commit

Permalink
renamed file to fh
Browse files Browse the repository at this point in the history
  • Loading branch information
yaph committed Jul 24, 2014
1 parent 5b2d3a7 commit 588f898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion logya/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ def default(self, obj):
elif isinstance(obj, datetime.timedelta):
return (datetime.datetime.min + obj).time().isoformat()
else:
return super(DateTimeEncoder, self).default(obj)
return super(JSONEncoder, self).default(obj)
6 changes: 3 additions & 3 deletions logya/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def getfile(self, dir_dst, path):
os.makedirs(dir_target)
return open(os.path.join(dir_dst, filename), 'w', encoding='utf-8')

def write(self, file, content):
def write(self, fh, content):
"""Write content to file and close it."""

if not is3:
content = content.encode('utf-8')
file.write(content)
file.close()
fh.write(content)
fh.close()


class DocWriter(FileWriter):
Expand Down

0 comments on commit 588f898

Please sign in to comment.