[damned-lies] Removed io usage



commit b98fe90eb9187da382be59c9cfc167f91c064cd9
Author: Claude Paroz <claude 2xlibre net>
Date:   Fri Mar 3 17:47:38 2017 +0100

    Removed io usage

 vertimus/views.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/vertimus/views.py b/vertimus/views.py
index a4aca6a..c84a53a 100644
--- a/vertimus/views.py
+++ b/vertimus/views.py
@@ -1,5 +1,4 @@
 import difflib
-import io
 import os
 
 from django.conf import settings
@@ -206,8 +205,8 @@ def vertimus_diff(request, action_id_1, action_id_2, level):
         raise Http404("File not found")
 
     d = difflib.HtmlDiff(wrapcolumn=80)
-    with io.open(file_path_1, encoding='utf-8', errors='replace') as fh1, \
-            io.open(file_path_2, encoding='utf-8', errors='replace') as fh2:
+    with open(file_path_1, encoding='utf-8', errors='replace') as fh1, \
+            open(file_path_2, encoding='utf-8', errors='replace') as fh2:
         diff_content = d.make_table(
             fh2.readlines(), fh1.readlines(),
              descr_2, descr_1, context=True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]