Skip to content

Commit

Permalink
avoid file descriptor leak warning
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@23205 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 19, 2019
1 parent 8200baf commit 99c7ec3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,8 @@ def get_nvcc_version(command):
#we have to figure out if "device_caps" exists in the headers:
ENABLE_DEVICE_CAPS = False
if os.path.exists("/usr/include/linux/videodev2.h"):
hdata = open("/usr/include/linux/videodev2.h").read()
with open("/usr/include/linux/videodev2.h") as f:
hdata = f.read()
ENABLE_DEVICE_CAPS = hdata.find("device_caps")>=0
kwargs = {"ENABLE_DEVICE_CAPS" : ENABLE_DEVICE_CAPS}
make_constants("xpra", "codecs", "v4l2", "constants", **kwargs)
Expand Down

0 comments on commit 99c7ec3

Please sign in to comment.