Making the gates happy
fix: allowlist_externals added to tox fix: upgrading gevent fix: pep8 issue fixed for slack_notifier fix: change env list Change-Id: Iefc7fdc89a398623aa3515c89240b53a49c10282
This commit is contained in:
parent
5225304a26
commit
13121a1059
@ -5,7 +5,7 @@ ARG REPO_VERSION=master
|
||||
ARG CONSTRAINTS_BRANCH=master
|
||||
ARG COMMON_VERSION=master
|
||||
# Extra Python3 dependencies.
|
||||
ARG EXTRA_DEPS="netaddr gevent==1.3.5 greenlet"
|
||||
ARG EXTRA_DEPS="netaddr gevent>=21.12.0 greenlet"
|
||||
# Always start from `monasca-base` image and use specific tag of it.
|
||||
ARG BASE_TAG=master
|
||||
FROM monasca/base:$BASE_TAG
|
||||
|
@ -120,7 +120,7 @@ class SlackNotifier(abstract_notifier.AbstractNotifier):
|
||||
def _send_message(self, request_options):
|
||||
try:
|
||||
url = request_options.get('url')
|
||||
result = requests.post(**request_options)
|
||||
result = requests.post(**request_options, timeout=CONF.slack_notifier.timeout)
|
||||
if result.status_code not in range(200, 300):
|
||||
self._log.error('Received an HTTP code {} when trying to post on URL {}.'
|
||||
.format(result.status_code, url))
|
||||
@ -176,7 +176,6 @@ class SlackNotifier(abstract_notifier.AbstractNotifier):
|
||||
'verify': verify,
|
||||
'params': query_params,
|
||||
'proxies': proxy_dict,
|
||||
'timeout': CONF.slack_notifier.timeout,
|
||||
data_format: slack_message
|
||||
}
|
||||
if self._send_message(request_options):
|
||||
|
5
tox.ini
5
tox.ini
@ -1,7 +1,8 @@
|
||||
[tox]
|
||||
envlist = py38,pep8,cover
|
||||
envlist = py3,pep8,cover
|
||||
minversion = 2.7
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
@ -13,7 +14,7 @@ passenv =
|
||||
*_PROXY
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
whitelist_externals = bash
|
||||
allowlist_externals = bash
|
||||
find
|
||||
rm
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user