diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-01-21 17:15:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 17:15:30 -0500 |
commit | 8c4fd886931abcf2cc8627a47463907d655b35c3 (patch) | |
tree | 5abcf1140d58c0498da01fa746d5581558423d2c /cloudinit/mergers/m_list.py | |
parent | 0562ca696fe1a36b6c3b2fb576068e05033f6f3f (diff) | |
download | vyos-cloud-init-8c4fd886931abcf2cc8627a47463907d655b35c3.tar.gz vyos-cloud-init-8c4fd886931abcf2cc8627a47463907d655b35c3.zip |
Start removing dependency on six (#178)
* url_helper: drop six
* url_helper: sort imports
* log: drop six
* log: sort imports
* handlers/__init__: drop six
* handlers/__init__: sort imports
* user_data: drop six
* user_data: sort imports
* sources/__init__: drop six
* sources/__init__: sort imports
* DataSourceOVF: drop six
* DataSourceOVF: sort imports
* sources/helpers/openstack: drop six
* sources/helpers/openstack: sort imports
* mergers/m_str: drop six
This also allowed simplification of the logic, as we will never
encounter a non-string text type.
* type_utils: drop six
* mergers/m_dict: drop six
* mergers/m_list: drop six
* cmd/query: drop six
* mergers/__init__: drop six
* net/cmdline: drop six
* reporting/handlers: drop six
* reporting/handlers: sort imports
Diffstat (limited to 'cloudinit/mergers/m_list.py')
-rw-r--r-- | cloudinit/mergers/m_list.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cloudinit/mergers/m_list.py b/cloudinit/mergers/m_list.py index daa0469a..19f32771 100644 --- a/cloudinit/mergers/m_list.py +++ b/cloudinit/mergers/m_list.py @@ -4,8 +4,6 @@ # # This file is part of cloud-init. See LICENSE file for license information. -import six - DEF_MERGE_TYPE = 'replace' MERGE_TYPES = ('append', 'prepend', DEF_MERGE_TYPE, 'no_replace') @@ -63,7 +61,7 @@ class Merger(object): return old_v if isinstance(new_v, (list, tuple)) and self._recurse_array: return self._merger.merge(old_v, new_v) - if isinstance(new_v, six.string_types) and self._recurse_str: + if isinstance(new_v, str) and self._recurse_str: return self._merger.merge(old_v, new_v) if isinstance(new_v, (dict)) and self._recurse_dict: return self._merger.merge(old_v, new_v) |