summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/handlers/__init__.py')
-rw-r--r--cloudinit/handlers/__init__.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index 0db75af9..a409ff8a 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -10,14 +10,12 @@
import abc
import os
-import six
-
-from cloudinit.settings import (PER_ALWAYS, PER_INSTANCE, FREQUENCIES)
from cloudinit import importer
from cloudinit import log as logging
from cloudinit import type_utils
from cloudinit import util
+from cloudinit.settings import (PER_ALWAYS, PER_INSTANCE, FREQUENCIES)
LOG = logging.getLogger(__name__)
@@ -60,8 +58,7 @@ INCLUSION_SRCH = sorted(list(INCLUSION_TYPES_MAP.keys()),
key=(lambda e: 0 - len(e)))
-@six.add_metaclass(abc.ABCMeta)
-class Handler(object):
+class Handler(metaclass=abc.ABCMeta):
def __init__(self, frequency, version=2):
self.handler_version = version
@@ -159,7 +156,7 @@ def _extract_first_or_bytes(blob, size):
# Extract the first line or upto X symbols for text objects
# Extract first X bytes for binary objects
try:
- if isinstance(blob, six.string_types):
+ if isinstance(blob, str):
start = blob.split("\n", 1)[0]
else:
# We want to avoid decoding the whole blob (it might be huge)