summaryrefslogtreecommitdiff
path: root/ironic/conductor/task_manager.py
diff options
context:
space:
mode:
authorRiccardo Pittau <elfosardo@gmail.com>2019-11-29 10:16:28 +0100
committerRiccardo Pittau <elfosardo@gmail.com>2019-12-23 09:38:25 +0100
commit78c121a5d7b6efc84d541ea4de98aa910255884e (patch)
treef60d0b75107c58f14ed99f81ef9c6831ecb2feea /ironic/conductor/task_manager.py
parent67f5a6bf5c8922a56d70daae023a004e672a88db (diff)
downloadironic-78c121a5d7b6efc84d541ea4de98aa910255884e.tar.gz
Stop using six library
Since we've dropped support for Python 2.7, it's time to look at the bright future that Python 3.x will bring and stop forcing compatibility with older versions. This patch removes the six library from requirements, not looking back. Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
Diffstat (limited to 'ironic/conductor/task_manager.py')
-rw-r--r--ironic/conductor/task_manager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ironic/conductor/task_manager.py b/ironic/conductor/task_manager.py
index b99cd1084..09aeb6c65 100644
--- a/ironic/conductor/task_manager.py
+++ b/ironic/conductor/task_manager.py
@@ -101,6 +101,7 @@ raised in the background thread.):
"""
import copy
+import functools
import futurist
from oslo_config import cfg
@@ -108,7 +109,6 @@ from oslo_log import log as logging
from oslo_utils import excutils
from oslo_utils import timeutils
import retrying
-import six
from ironic.common import driver_factory
from ironic.common import exception
@@ -131,7 +131,7 @@ def require_exclusive_lock(f):
as the first parameter after "self".
"""
- @six.wraps(f)
+ @functools.wraps(f)
def wrapper(*args, **kwargs):
# NOTE(dtantsur): this code could be written simpler, but then unit
# testing decorated functions is pretty hard, as we usually pass a Mock
@@ -378,7 +378,7 @@ class TaskManager(object):
if exc is not None:
msg = _("Async execution of %(method)s failed with error: "
"%(error)s") % {'method': method,
- 'error': six.text_type(exc)}
+ 'error': str(exc)}
node.last_error = msg
try:
node.save()