Merge "Update hacking and fix warnings"
This commit is contained in:
commit
f1be1dd955
|
@ -237,7 +237,7 @@ class HTTPAction(actions.Action):
|
||||||
# Represent important resp data as a dictionary.
|
# Represent important resp data as a dictionary.
|
||||||
try:
|
try:
|
||||||
content = resp.json(encoding=resp.encoding)
|
content = resp.json(encoding=resp.encoding)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
LOG.debug("HTTP action response is not json.")
|
LOG.debug("HTTP action response is not json.")
|
||||||
content = resp.content
|
content = resp.content
|
||||||
if content and resp.encoding not in (None, 'utf-8'):
|
if content and resp.encoding not in (None, 'utf-8'):
|
||||||
|
|
|
@ -461,13 +461,13 @@ class Task(object):
|
||||||
def save_started_time(self, value='default'):
|
def save_started_time(self, value='default'):
|
||||||
if not self.task_ex:
|
if not self.task_ex:
|
||||||
return
|
return
|
||||||
time = value if value is not 'default' else utils.utc_now_sec()
|
time = value if value != 'default' else utils.utc_now_sec()
|
||||||
self.task_ex.started_at = time
|
self.task_ex.started_at = time
|
||||||
|
|
||||||
def save_finished_time(self, value='default'):
|
def save_finished_time(self, value='default'):
|
||||||
if not self.task_ex:
|
if not self.task_ex:
|
||||||
return
|
return
|
||||||
time = value if value is not 'default' else utils.utc_now_sec()
|
time = value if value != 'default' else utils.utc_now_sec()
|
||||||
self.task_ex.finished_at = time
|
self.task_ex.finished_at = time
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
hacking>=1.1.0 # Apache-2.0
|
||||||
|
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
croniter>=0.3.4 # MIT License
|
croniter>=0.3.4 # MIT License
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -2,6 +2,7 @@
|
||||||
envlist = py37,pep8
|
envlist = py37,pep8
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
@ -96,7 +97,7 @@ whitelist_externals = rm
|
||||||
|
|
||||||
#Skip PEP257 violation.
|
#Skip PEP257 violation.
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,E402,W503,E731
|
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,E402,W503,E731,W504
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
# [H106] Don't put vim configuration in source files.
|
# [H106] Don't put vim configuration in source files.
|
||||||
|
|
Loading…
Reference in New Issue