From 115906a5fcb874c000d7f6ec1d828ef2e5ad0d50 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 18 Feb 2012 15:55:03 -0500 Subject: [PATCH] Explicitly use __builtin__.open to avoid open() calling itself. --- apachelog/file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apachelog/file.py b/apachelog/file.py index 5d0c95e..2f8076f 100644 --- a/apachelog/file.py +++ b/apachelog/file.py @@ -1,3 +1,4 @@ +import __builtin__ import gzip as _gzip import os.path as _os_path @@ -26,5 +27,5 @@ def open(filename, openers=None): if openers is None: openers = OPENERS extension = _os_path.splitext(filename)[-1] - opener = openers.get(extension, open) + opener = openers.get(extension, __builtin__.open) return opener(filename, 'r') -- 2.26.2