Fix file.managed for Windows (#33181)

* Revert back to import string_types

For some reason, there is a problem with the following
code when run from the file.py module:
```
from salt.ext import six
comment = 'This is a string'
isinstance(comment, six.string_types)
```
When run from within the python shell it works fine.

* Add six import

* Fix some lint

* Use correct six import

* Changed it back to explicit import

* Additional comments specific to 2015.5

* Fix file.managed for real

* Move comment to clarify purpose
This commit is contained in:
Shane Lee 2016-05-11 17:59:05 -06:00 committed by Nicole Thomas
parent 30868ab06c
commit 09b072a412
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ import glob
import mmap
# pylint: disable=import-error,no-name-in-module,redefined-builtin
from salt.ext import six
import salt.ext.six as six
from salt.ext.six.moves import range, reduce, zip
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse
# pylint: enable=import-error,no-name-in-module,redefined-builtin

View file

@ -29,8 +29,8 @@ import sys # do not remove, used in imported file.py functions
import fileinput # do not remove, used in imported file.py functions
import fnmatch # do not remove, used in imported file.py functions
import mmap # do not remove, used in imported file.py functions
from salt.ext.six import string_types # do not remove, used in imported file.py functions
# do not remove, used in imported file.py functions
import salt.ext.six as six # pylint: disable=import-error,no-name-in-module
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse # pylint: disable=import-error,no-name-in-module
import salt.utils.atomicfile # do not remove, used in imported file.py functions
from salt.exceptions import CommandExecutionError, SaltInvocationError