Migrate basestring to a python3 compatible type (#17199)

This commit is contained in:
Toshio Kuratomi 2016-08-23 13:13:44 -07:00 committed by GitHub
parent a695e18615
commit a22909c226
28 changed files with 137 additions and 101 deletions

View file

@ -33,6 +33,7 @@ import shlex
import itertools
from ansible.module_utils.basic import BOOLEANS_TRUE, BOOLEANS_FALSE
from ansible.module_utils.six import string_types
DEFAULT_COMMENT_TOKENS = ['#', '!', '/*', '*/']
@ -197,7 +198,7 @@ class NetworkConfig(object):
self.load(open(filename).read())
def get(self, path):
if isinstance(path, basestring):
if isinstance(path, string_types):
path = [path]
for item in self._config:
if item.text == path[-1]: