Skip to content

Commit

Permalink
winVersion.getWinVer: call sys.getwindowsversion function inside getW…
Browse files Browse the repository at this point in the history
…inVer, removing the need to look up old winVersion tuple. Re nvaccess#11837.

Rather than using now old winVersion tuple, call sys.getwindowsversion function directly from getWinVer function.
  • Loading branch information
josephsl committed Dec 11, 2020
1 parent e2bd2f0 commit 45e33e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/winVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ def isWin10(self, release: str = "1507", atLeast: bool = True):


def getWinVer():
winVer = sys.getwindowsversion()
return WinVersion(
major=winVersion.major,
minor=winVersion.minor,
build=winVersion.build,
servicePack=winVersion.service_pack
major=winVer.major,
minor=winVer.minor,
build=winVer.build,
servicePack=winVer.service_pack
)


Expand Down

0 comments on commit 45e33e9

Please sign in to comment.