Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
Version 1.0.1
  • Loading branch information
PaperMtn committed Nov 14, 2020
2 parents e74159b + 11b0f7e commit f2f23bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
## 1.0.1 - 2020-11-x
### Fixed
- Retry added for occasional Requests HTTPSConnectionPool error

## 1.0.0 - 2020-10-01
Released
Release
2 changes: 1 addition & 1 deletion github_watchman/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__title__ = 'GitHub Watchman'
__summary__ = 'Monitoring GitHub for sensitive data shared publicly'
__uri__ = 'https://github.com/PaperMtn/github-watchman'
__version__ = '1.0.0'
__version__ = '1.0.1'
__author__ = 'PaperMtn'
__email__ = '[email protected]'
__license__ = 'GPL-3.0'
Expand Down
4 changes: 3 additions & 1 deletion github_watchman/github_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import requests
import yaml
from requests.exceptions import HTTPError
from requests.packages.urllib3.util import Retry
from requests.adapters import HTTPAdapter

import github_watchman.config as cfg
import github_watchman.logger as logger
Expand All @@ -19,7 +21,7 @@ def __init__(self, token, base_url):
self.base_url = base_url.rstrip('\\')
self.per_page = 100
self.session = session = requests.session()
session.mount(self.base_url, requests.adapters.HTTPAdapter())
session.mount(self.base_url, HTTPAdapter(max_retries=Retry(connect=3, backoff_factor=1)))
session.headers.update({
'Authorization': 'token {}'.format(self.token),
'Accept': 'application/vnd.github.v3.text-match+json'
Expand Down

0 comments on commit f2f23bd

Please sign in to comment.