mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2015.5' of https://github.com/saltstack/salt into fix_25352
This commit is contained in:
commit
d78fa97a71
4 changed files with 12 additions and 6 deletions
|
@ -1735,7 +1735,7 @@ def get_routes(iface):
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' ip.get_interface eth0
|
||||
salt '*' ip.get_routes eth0
|
||||
'''
|
||||
|
||||
filename = os.path.join(_DEB_NETWORK_UP_DIR, 'route-{0}'.format(iface))
|
||||
|
|
|
@ -2771,7 +2771,7 @@ def get_managed(
|
|||
elif source.startswith('/'):
|
||||
source_sum = get_hash(source)
|
||||
elif source_hash:
|
||||
protos = ('salt', 'http', 'https', 'ftp', 'swift')
|
||||
protos = ('salt', 'http', 'https', 'ftp', 'swift', 's3')
|
||||
if _urlparse(source_hash).scheme in protos:
|
||||
# The source_hash is a file on a server
|
||||
hash_fn = __salt__['cp.cache_file'](source_hash, saltenv)
|
||||
|
|
|
@ -260,12 +260,18 @@ def gen_locale(locale, **kwargs):
|
|||
|
||||
if on_debian or on_gentoo: # file-based search
|
||||
search = '/usr/share/i18n/SUPPORTED'
|
||||
valid = __salt__['file.search'](search, '^{0}$'.format(locale))
|
||||
|
||||
def search_locale():
|
||||
return __salt__['file.search'](search,
|
||||
'^{0}$'.format(locale),
|
||||
flags=re.MULTILINE)
|
||||
|
||||
valid = search_locale()
|
||||
if not valid and not locale_info['charmap']:
|
||||
# charmap was not supplied, so try copying the codeset
|
||||
locale_info['charmap'] = locale_info['codeset']
|
||||
locale = _join_locale(locale_info)
|
||||
valid = __salt__['file.search'](search, '^{0}$'.format(locale))
|
||||
valid = search_locale()
|
||||
else: # directory-based search
|
||||
if on_suse:
|
||||
search = '/usr/share/locale'
|
||||
|
|
|
@ -114,7 +114,7 @@ class LocalemodTestCase(TestCase):
|
|||
'''
|
||||
Tests the return of successful gen_locale on Debian system without a charmap
|
||||
'''
|
||||
def file_search(search, pattern):
|
||||
def file_search(search, pattern, flags):
|
||||
'''
|
||||
mock file.search
|
||||
'''
|
||||
|
@ -164,7 +164,7 @@ class LocalemodTestCase(TestCase):
|
|||
'''
|
||||
Tests the return of successful gen_locale on Gentoo system without a charmap
|
||||
'''
|
||||
def file_search(search, pattern):
|
||||
def file_search(search, pattern, flags):
|
||||
'''
|
||||
mock file.search
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue