From: Daniel Morrison Date: Sun, 16 Nov 2014 03:51:52 +0000 (-0500) Subject: Change file-like objects to strings. X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=d1f9af60398982c98c70540629d945189dc7c063;p=chevron.git Change file-like objects to strings. --- 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