From 260e11c4416334d538389cb50bcd70fcb8592290 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 19 Dec 2016 16:19:21 +0100 Subject: [PATCH] Fixed closing PE file --- winver.py | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/winver.py b/winver.py index e239690..47cda21 100644 --- a/winver.py +++ b/winver.py @@ -26,6 +26,7 @@ def getWindowsVersion(path): version = "" pe = pefile.PE(getWindowsDirectory(path) + "/System32/ntdll.dll") version = str(pe.FileInfo[0].StringTable[0].entries[b'ProductVersion'],'utf-8') + pe.close() if re.match("(3|4)\.",version) != None: return _WIN_NT elif re.match("5\.0", version) != None: -- libgit2 0.22.2