summaryrefslogtreecommitdiff
path: root/nova/context.py
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2020-05-14 21:04:12 +0900
committerTakashi Natsume <takanattie@gmail.com>2020-12-13 11:25:14 +0000
commit07462dd0050fbfea89e517759b312b67a368e279 (patch)
treed272a68079988f8147a3d3950b9a60bd8afc13d1 /nova/context.py
parentf851d20b652f9f29de9caa0749a78bf29c326b6d (diff)
downloadnova-07462dd0050fbfea89e517759b312b67a368e279.tar.gz
Remove six.binary_type/integer_types/string_types
Replace the following items with Python 3 style code. - six.binary_type - six.integer_types - six.string_types Subsequent patches will replace other six usages. Change-Id: Ide65686cf02463045f5c32771ca949802b19636f Implements: blueprint six-removal Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Diffstat (limited to 'nova/context.py')
-rw-r--r--nova/context.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/context.py b/nova/context.py
index e72fd05a9c..a6d706fdb0 100644
--- a/nova/context.py
+++ b/nova/context.py
@@ -28,7 +28,6 @@ from oslo_context import context
from oslo_db.sqlalchemy import enginefacade
from oslo_log import log as logging
from oslo_utils import timeutils
-import six
from nova import exception
from nova.i18n import _
@@ -107,7 +106,7 @@ class RequestContext(context.RequestContext):
self.remote_address = remote_address
if not timestamp:
timestamp = timeutils.utcnow()
- if isinstance(timestamp, six.string_types):
+ if isinstance(timestamp, str):
timestamp = timeutils.parse_strtime(timestamp)
self.timestamp = timestamp