mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
Merge pull request #125 from iBug/apt-sync-user-agent
apt-sync.py: Set default User-Agent for requests lib
This commit is contained in:
commit
a3f82e9ba0
@ -18,6 +18,10 @@ from typing import List, Dict, Set, Tuple, IO
|
|||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
APT_SYNC_USER_AGENT = os.getenv("APT_SYNC_USER_AGENT", "APT-Mirror-Tool/1.0")
|
||||||
|
requests.utils.default_user_agent = lambda: APT_SYNC_USER_AGENT
|
||||||
|
|
||||||
OS_TEMPLATE = {
|
OS_TEMPLATE = {
|
||||||
'ubuntu-current': ["xenial", "bionic", "focal", "groovy"],
|
'ubuntu-current': ["xenial", "bionic", "focal", "groovy"],
|
||||||
'ubuntu-lts': ["xenial", "bionic", "focal"],
|
'ubuntu-lts': ["xenial", "bionic", "focal"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user