mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00

Using: raise SystemExit('some message') is equivalent to: sys.stderr.write('some message\n') sys.exit(1)
20 lines
356 B
Python
20 lines
356 B
Python
#!/usr/bin/env python2
|
|
'''
|
|
Publish commands to the salt system from the command line on the master.
|
|
'''
|
|
|
|
import salt.cli
|
|
|
|
|
|
def main():
|
|
'''
|
|
The main function
|
|
'''
|
|
cp_ = salt.cli.SaltCP()
|
|
cp_.run()
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
main()
|
|
except KeyboardInterrupt:
|
|
raise SystemExit('\nExiting gracefully on Ctrl-c')
|