Skip to content

Commit 4f31f9e

Browse files
committed
✨ 🐛 set max retry time to 3
1 parent 9bb8761 commit 4f31f9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

code_counter/tools/request.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
# -*- coding: utf-8 -*-
33

44
import requests
5+
from requests.adapters import HTTPAdapter
56
from code_counter.conf.config import Config
67

78
session = requests.Session()
9+
session.mount('https://', HTTPAdapter(max_retries=3))
810

911

1012
def is_gitee(url):

0 commit comments

Comments
 (0)