diff options
| author | Christian Poessinger <christian@poessinger.com> | 2020-03-11 21:15:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-11 21:15:45 +0100 |
| commit | fd87c24ff8f6f09a7e2cc223a4e8cdb8c08f1ef8 (patch) | |
| tree | b754b3991e5e57a9ae9155819f73fa0cbd4be269 /cloudinit/handlers/__init__.py | |
| parent | ca9a4eb26b41c204d1bd3a15586b14a5dde950bb (diff) | |
| parent | c6627bc05a57645e6af8b9a5a67e452d9f37e487 (diff) | |
| download | vyos-cloud-init-fd87c24ff8f6f09a7e2cc223a4e8cdb8c08f1ef8.tar.gz vyos-cloud-init-fd87c24ff8f6f09a7e2cc223a4e8cdb8c08f1ef8.zip | |
Merge pull request #4 from zdc/T2117
Cloud-init: T2117: Updated to 20.1 version
Diffstat (limited to 'cloudinit/handlers/__init__.py')
| -rw-r--r-- | cloudinit/handlers/__init__.py | 9 |
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) |
