forked from Mirror/pmbootstrap
helpers: aportupgrade: fix req_headers init (MR 2252)
I broke this while adding type hints. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
0970b9d00b
commit
42d9f4e3cd
1 changed files with 3 additions and 3 deletions
|
@ -13,8 +13,8 @@ import pmb.helpers.file
|
|||
import pmb.helpers.http
|
||||
import pmb.helpers.pmaports
|
||||
|
||||
req_headers: Dict[str, str]
|
||||
req_headers_github: Dict[str, str]
|
||||
req_headers: Dict[str, str] = {}
|
||||
req_headers_github: Dict[str, str] = {}
|
||||
|
||||
ANITYA_API_BASE = "https://release-monitoring.org/api/v2"
|
||||
GITHUB_API_BASE = "https://api.github.com"
|
||||
|
@ -31,7 +31,7 @@ def init_req_headers() -> None:
|
|||
global req_headers
|
||||
global req_headers_github
|
||||
# Only initialize them once
|
||||
if req_headers is not None and req_headers_github is not None:
|
||||
if req_headers and req_headers_github:
|
||||
return
|
||||
# Generic request headers
|
||||
req_headers = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue