Skip to content

Commit 3ac008e

Browse files
Alexandru Cheltuitorkaplun
authored andcommitted
Update user-ager formatting
1 parent f3d1a8a commit 3ac008e

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Table of Contents
44

5+
- [v2.2.10](#v2210)
6+
- [v2.2.7](#v227)
57
- [v2.2.6](#v226)
68
- [v2.2.5](#v225)
79
- [v2.2.4](#v224)
@@ -15,6 +17,16 @@
1517
- [v2.0.0](#v200)
1618
- [v0.1.0](#v010)
1719

20+
## v2.2.10
21+
22+
- Fix: User-Agent format
23+
- Fix: Version update messages and README
24+
25+
## v2.2.7
26+
27+
- Enhancement: Add User-Agent to API requests
28+
29+
1830
## v2.2.6
1931

2032
- Enhancement: Properly specifies versioning when contacting Proton API

protonvpn_cli/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def call_api(endpoint, json_format=True, handle_errors=True):
3232
"x-pm-appversion": "LinuxVPN_{0}".format(VERSION),
3333
"x-pm-apiversion": "3",
3434
"Accept": "application/vnd.protonmail.v1+json",
35-
"User-Agent": "ProtonVPN (Linux; {}/{})".format(distribution, version),
35+
"User-Agent": "ProtonVPN/{} (Linux; {}/{})".format(VERSION, distribution, version),
3636
}
3737

3838
logger.debug("Initiating API Call: {0}".format(url))

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""setup.py: setuptools control."""
22

33

4-
import re, os
4+
import re
5+
import os
56
from setuptools import setup
67

78
try:
@@ -17,7 +18,7 @@
1718
"""
1819

1920
version = re.search(
20-
r'(VERSION = "(\d.\d.\d)")',
21+
r'(VERSION = "(\d.\d.\d+)")',
2122
open("protonvpn_cli/constants.py").read(),
2223
re.M
2324
).group(2)

0 commit comments

Comments
 (0)