Skip to content

Commit

Permalink
Add win2000
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Mar 18, 2024
1 parent 50c420a commit b98c41e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions msys2-logstats
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def test_parse_user_agent():
def test_get_windows_edition():
ua = "pacman/6.0.1 (MSYS_NT-6.0-6002 x86_64) libalpm/13.0.1"
assert get_windows_edition(parse_user_agent(ua)) == "Vista"
ua = "pacman/4.2.1-463-gbb493-dirty (MINGW32_NT-5.0 i686) libalpm/10.0.0"
assert get_windows_edition(parse_user_agent(ua)) == "2000"


def get_windows_edition(ua: UserAgent):
Expand All @@ -107,6 +109,8 @@ def get_windows_edition(ua: UserAgent):
return "11"
else:
return "10"
elif ua.windows_version == (5, 0):
return "2000"
elif ua.windows_version == (5, 1):
return "XP"
elif ua.windows_version == (5, 2):
Expand Down

0 comments on commit b98c41e

Please sign in to comment.