mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Disable DNS checks when using --local
. Fixes #2677.
This commit is contained in:
parent
4fc12f58ee
commit
1f6d7f2c1c
@ -81,6 +81,7 @@ def load_config(opts, path, env_var):
|
||||
if not os.path.isfile(path):
|
||||
template = '{0}.template'.format(path)
|
||||
if os.path.isfile(template):
|
||||
import salt.utils # Need to re-import, need to find out why
|
||||
with salt.utils.fopen(path, 'w') as out:
|
||||
with salt.utils.fopen(template, 'r') as f:
|
||||
f.readline() # skip first line
|
||||
|
@ -11,6 +11,7 @@ import os
|
||||
import sys
|
||||
import logging
|
||||
import optparse
|
||||
import traceback
|
||||
from functools import partial
|
||||
from salt import config, loader, log, version
|
||||
|
||||
@ -116,7 +117,7 @@ class OptionParser(optparse.OptionParser):
|
||||
process_option_func()
|
||||
except Exception, err:
|
||||
self.error('Error while processing {0}: {1}'.format(
|
||||
process_option_func, err
|
||||
process_option_func, traceback.format_exc(err)
|
||||
))
|
||||
|
||||
# Run the functions on self._mixin_after_parsed_funcs
|
||||
@ -1099,7 +1100,10 @@ class SaltCallOptionParser(OptionParser, ConfigDirMixIn, LogLevelMixIn,
|
||||
self.config['arg'] = self.args[1:]
|
||||
|
||||
def setup_config(self):
|
||||
return config.minion_config(self.get_config_file_path('minion'))
|
||||
return config.minion_config(
|
||||
self.get_config_file_path('minion'),
|
||||
check_dns=not self.options.local
|
||||
)
|
||||
|
||||
def process_module_dirs(self):
|
||||
if self.options.module_dirs:
|
||||
|
Loading…
Reference in New Issue
Block a user