replace broken salt.exitcodes refs with salt.defaults.exitcodes

This commit is contained in:
Chris Rebert 2014-12-22 18:02:18 -08:00
parent 7f2df0df7a
commit decdc54cab
4 changed files with 10 additions and 10 deletions

View File

@ -312,7 +312,7 @@ class SSH(object):
if stderr:
return {host: stderr}
return {host: 'Bad Return'}
if salt.exitcodes.EX_OK != retcode:
if salt.defaults.exitcodes.EX_OK != retcode:
return {host: stderr}
return {host: stdout}

View File

@ -43,7 +43,7 @@ except ImportError:
log.fatal('Unable to import msgpack or msgpack_pure python modules')
# Don't exit if msgpack is not available, this is to make local mode
# work without msgpack
#sys.exit(salt.exitcodes.EX_GENERIC)
#sys.exit(salt.defaults.exitcodes.EX_GENERIC)
def package(payload):

View File

@ -198,7 +198,7 @@ class OptionParser(optparse.OptionParser):
def print_versions_report(self, file=sys.stdout):
print('\n'.join(version.versions_report()), file=file)
self.exit(salt.exitcodes.EX_OK)
self.exit(salt.defaults.exitcodes.EX_OK)
class MergeConfigMixIn(object):
@ -1704,7 +1704,7 @@ class SaltCPOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
# salt-cp needs arguments
if len(self.args) <= 1:
self.print_help()
self.exit(salt.exitcodes.EX_USAGE)
self.exit(salt.defaults.exitcodes.EX_USAGE)
if self.options.list:
if ',' in self.args[0]:
@ -2105,7 +2105,7 @@ class SaltCallOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
def _mixin_after_parsed(self):
if not self.args and not self.options.grains_run and not self.options.doc:
self.print_help()
self.exit(salt.exitcodes.EX_USAGE)
self.exit(salt.defaults.exitcodes.EX_USAGE)
elif len(self.args) >= 1:
if self.options.grains_run:
@ -2407,7 +2407,7 @@ class SaltSSHOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
def _mixin_after_parsed(self):
if not self.args:
self.print_help()
self.exit(salt.exitcodes.EX_USAGE)
self.exit(salt.defaults.exitcodes.EX_USAGE)
if self.options.list:
if ',' in self.args[0]:
@ -2420,7 +2420,7 @@ class SaltSSHOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
self.config['argv'] = self.args[1:]
if not self.config['argv'] or not self.config['tgt']:
self.print_help()
self.exit(salt.exitcodes.EX_USAGE)
self.exit(salt.defaults.exitcodes.EX_USAGE)
if self.options.ssh_askpass:
self.options.ssh_passwd = getpass.getpass('Password: ')
@ -2455,7 +2455,7 @@ class SaltCloudParser(OptionParser,
def print_versions_report(self, file=sys.stdout):
print('\n'.join(version.versions_report(include_salt_cloud=True)),
file=file)
self.exit(salt.exitcodes.EX_OK)
self.exit(salt.defaults.exitcodes.EX_OK)
def parse_args(self, args=None, values=None):
try:
@ -2472,7 +2472,7 @@ class SaltCloudParser(OptionParser,
print('Salt cloud configuration dump(INCLUDES SENSIBLE DATA):')
pprint.pprint(self.config)
self.exit(salt.exitcodes.EX_OK)
self.exit(salt.defaults.exitcodes.EX_OK)
if self.args:
self.config['names'] = self.args

View File

@ -36,7 +36,7 @@ except ImportError:
log.fatal('Unable to import msgpack or msgpack_pure python modules')
# Don't exit if msgpack is not available, this is to make local mode
# work without msgpack
#sys.exit(salt.exitcodes.EX_GENERIC)
#sys.exit(salt.defaults.exitcodes.EX_GENERIC)
available = False