Skip to content

Commit 34ec65c

Browse files
committed
Fix Python version print
1 parent 20474ca commit 34ec65c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tranco/tranco.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from io import BytesIO
33
import requests
44
import os
5-
import sys
5+
import platform
66
import zipfile
77

88
VERSION = '0.7'
@@ -43,7 +43,7 @@ def __init__(self, **kwargs):
4343
self.api_key = kwargs.get('api_key')
4444

4545
self.session = requests.Session()
46-
self.session.headers.update({'User-Agent': 'Python/{} python-requests/{} tranco-python/{}'.format(sys.version, requests.__version__, VERSION)})
46+
self.session.headers.update({'User-Agent': 'Python/{} python-requests/{} tranco-python/{}'.format(platform.python_version(), requests.__version__, VERSION)})
4747

4848
def _cache_path(self, date):
4949
return os.path.join(self.cache_dir, date + '-DEFAULT.csv')

0 commit comments

Comments
 (0)