From 588f8988911383d3d0b7a4fb25c63d8f26d55d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20G=C3=B3mez?= Date: Thu, 24 Jul 2014 19:26:10 +0200 Subject: [PATCH] renamed file to fh --- logya/encoder.py | 2 +- logya/writer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/logya/encoder.py b/logya/encoder.py index 8dda143..510af5e 100644 --- a/logya/encoder.py +++ b/logya/encoder.py @@ -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) \ No newline at end of file + return super(JSONEncoder, self).default(obj) \ No newline at end of file diff --git a/logya/writer.py b/logya/writer.py index 3215590..074471f 100644 --- a/logya/writer.py +++ b/logya/writer.py @@ -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):