projects
/
apachelog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6af1b12
)
Explicitly use __builtin__.open to avoid open() calling itself.
author
W. Trevor King
<wking@drexel.edu>
Sat, 18 Feb 2012 20:55:03 +0000
(15:55 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Sat, 18 Feb 2012 20:55:46 +0000
(15:55 -0500)
apachelog/file.py
patch
|
blob
|
history
diff --git
a/apachelog/file.py
b/apachelog/file.py
index 5d0c95e5a01a6c8eea8cbdd93baa50e090bf62df..2f8076fa535c2009af445db829dfcc726547b89d 100644
(file)
--- 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')