Added missing arguments check

This commit is contained in:
Dmitry Malinovsky 2013-10-07 10:49:57 +07:00
parent 8a8c2a68aa
commit f6c1f4a962

View File

@ -1599,6 +1599,10 @@ class SaltSSHOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
'initial deployment of keys very fast and easy') 'initial deployment of keys very fast and easy')
def _mixin_after_parsed(self): def _mixin_after_parsed(self):
if not self.args:
self.print_help()
self.exit(1)
if self.options.list: if self.options.list:
if ',' in self.args[0]: if ',' in self.args[0]:
self.config['tgt'] = self.args[0].split(',') self.config['tgt'] = self.args[0].split(',')