From d1f9af60398982c98c70540629d945189dc7c063 Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Sat, 15 Nov 2014 22:51:52 -0500 Subject: [PATCH] Change file-like objects to strings. --- entei.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entei.py b/entei.py index 0ca4747..48c85b3 100755 --- a/entei.py +++ b/entei.py @@ -2,8 +2,8 @@ import json +import mmap from sys import argv -from io import StringIO def tokenize(template): @@ -71,8 +71,8 @@ def tokenize(template): } try: - template = StringIO(template) - except TypeError: + mmap.mmap(template.fileno()) + except AttributeError: pass template.is_finished = False -- 2.47.3