Commit dd26853cf663f891518aedc3f7aa73400ac558a7

Authored by root
1 parent 260e11c4

Fixed closing PE file

Showing 1 changed file with 1 additions and 1 deletions
winver.py
@@ -26,7 +26,7 @@ def getWindowsVersion(path): @@ -26,7 +26,7 @@ def getWindowsVersion(path):
26 version = "" 26 version = ""
27 pe = pefile.PE(getWindowsDirectory(path) + "/System32/ntdll.dll") 27 pe = pefile.PE(getWindowsDirectory(path) + "/System32/ntdll.dll")
28 version = str(pe.FileInfo[0].StringTable[0].entries[b'ProductVersion'],'utf-8') 28 version = str(pe.FileInfo[0].StringTable[0].entries[b'ProductVersion'],'utf-8')
29 - pe.close() 29 + pe.close()
30 if re.match("(3|4)\.",version) != None: 30 if re.match("(3|4)\.",version) != None:
31 return _WIN_NT 31 return _WIN_NT
32 elif re.match("5\.0", version) != None: 32 elif re.match("5\.0", version) != None: