salt/scripts/salt-cp
Jeff Schroeder 021cebbbf3 Teach all non-daemon scripts how to cleanly exit on CTRL-c
Using: raise SystemExit('some message')

is equivalent to:
sys.stderr.write('some message\n')
sys.exit(1)
2011-12-20 19:09:27 -08:00

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')