summaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-12-24 11:22:04 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-12-24 11:22:04 +0100
commit49b1c0ccc5e93016cc374d1c0b593d0ce25b2e8e (patch)
treef0f628a5841e756f5fb4fa548546021b05d0320e /builder.py
parentf62de17cae10c7a8cd2a2b2f135ba504e9af01d0 (diff)
downloadastroid-49b1c0ccc5e93016cc374d1c0b593d0ce25b2e8e.tar.gz
close the byte stream avoid warning w/ python3
Diffstat (limited to 'builder.py')
-rw-r--r--builder.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/builder.py b/builder.py
index 6b80f35..fc653ec 100644
--- a/builder.py
+++ b/builder.py
@@ -44,6 +44,7 @@ if sys.version_info >= (3, 0):
def open_source_file(filename):
byte_stream = open(filename, 'bU')
encoding = detect_encoding(byte_stream.readline)[0]
+ byte_stream.close()
stream = open(filename, 'U', encoding=encoding)
try:
data = stream.read()