Skip to content

Commit

Permalink
Version 2.3
Browse files Browse the repository at this point in the history
Increase timeouts for self update. Tested with Python 3.9.0
  • Loading branch information
Technetium1 committed Oct 9, 2020
1 parent d855b85 commit 6f896f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ChocolateyUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import certifi
import sys

version = "2.2"
version = "2.3"


def printascii():
Expand Down Expand Up @@ -113,7 +113,7 @@ def selfupdate():
"GET",
updateurl,
headers={"User-Agent": "curl", "Accept": "application/vnd.github.v3+json"},
timeout=urllib3.Timeout(connect=6.0, read=6.0),
timeout=urllib3.Timeout(connect=15.0, read=15.0),
retries=4,
redirect=False)
updateresult = json.loads(r.data.decode("utf-8"))
Expand All @@ -139,7 +139,7 @@ def selfupdate():
"GET",
downloadlink,
headers={"User-Agent": "curl"},
timeout=urllib3.Timeout(connect=10.0, read=120.0),
timeout=urllib3.Timeout(connect=15.0, read=120.0),
retries=2,
redirect=True)
with open("NewChocolateyUpdate.exe", "wb") as downloadedfile:
Expand Down

0 comments on commit 6f896f3

Please sign in to comment.