mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25296 from twangboy/fix_25294
Fixed file.comment for windows
This commit is contained in:
commit
0a7ec11212
1 changed files with 5 additions and 2 deletions
|
@ -16,6 +16,8 @@ import os.path
|
|||
import logging
|
||||
import struct
|
||||
# pylint: disable=W0611
|
||||
import operator # do not remove
|
||||
from collections import Iterable, Mapping # do not remove
|
||||
import datetime # do not remove.
|
||||
import tempfile # do not remove. Used in salt.modules.file.__clean_tmp
|
||||
import itertools # same as above, do not remove, it's used in __clean_tmp
|
||||
|
@ -59,7 +61,7 @@ from salt.modules.file import (check_hash, # pylint: disable=W0611
|
|||
search, _get_flags, extract_hash, _error, _sed_esc, _psed,
|
||||
RE_FLAG_TABLE, blockreplace, prepend, seek_read, seek_write, rename,
|
||||
lstat, path_exists_glob, write, pardir, join, HASHES, comment,
|
||||
uncomment)
|
||||
uncomment, _add_flags)
|
||||
|
||||
from salt.utils import namespaced_function as _namespaced_function
|
||||
|
||||
|
@ -85,7 +87,7 @@ def __virtual__():
|
|||
global access, copy, readdir, rmdir, truncate, replace, search
|
||||
global _binary_replace, _get_bkroot, list_backups, restore_backup
|
||||
global blockreplace, prepend, seek_read, seek_write, rename, lstat
|
||||
global write, pardir, join
|
||||
global write, pardir, join, _add_flags
|
||||
global path_exists_glob, comment, uncomment, _mkstemp_copy
|
||||
|
||||
replace = _namespaced_function(replace, globals())
|
||||
|
@ -142,6 +144,7 @@ def __virtual__():
|
|||
comment = _namespaced_function(comment, globals())
|
||||
uncomment = _namespaced_function(uncomment, globals())
|
||||
_mkstemp_copy = _namespaced_function(_mkstemp_copy, globals())
|
||||
_add_flags = _namespaced_function(_add_flags, globals())
|
||||
|
||||
return __virtualname__
|
||||
return False
|
||||
|
|
Loading…
Add table
Reference in a new issue