Skip to content

Commit 4387373

Browse files
authored
Merge pull request #106 from totaam/patch-1
fix resource warning
2 parents bc28f93 + e727dc5 commit 4387373

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OpenGL/platform/egl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def EGL(self):
7373
# https://github.com/raspberrypi/firmware/issues/110
7474
import os
7575
if os.path.exists('/proc/cpuinfo'):
76-
info = open('/proc/cpuinfo').read()
76+
with open('/proc/cpuinfo', 'r') as f:
77+
info = f.read()
7778
if 'BCM2708' in info or 'BCM2709' in info:
7879
assert self.GLES2
7980
try:

0 commit comments

Comments
 (0)