mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
parent
30868ab06c
commit
09b072a412
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue