From dd26853cf663f891518aedc3f7aa73400ac558a7 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 19 Dec 2016 16:20:31 +0100 Subject: [PATCH] Fixed closing PE file --- winver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winver.py b/winver.py index 47cda21..8a132ce 100644 --- a/winver.py +++ b/winver.py @@ -26,7 +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() + pe.close() if re.match("(3|4)\.",version) != None: return _WIN_NT elif re.match("5\.0", version) != None: -- libgit2 0.22.2