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
commit46cf84884626d8e960d53ea74f2e3aac2f603122 (patch)
treeb10ecf600c95fdd1b738da65dfd64bb49592af9b /builder.py
parent5d2fcf060013b7698b32a4a35302ac808679a513 (diff)
downloadastroid-git-46cf84884626d8e960d53ea74f2e3aac2f603122.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 6b80f350..fc653ec2 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()