Created
August 29, 2012 01:47
-
-
Save michelp/3505979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parser = App.build_option_parser(self, description, version) | |
parser.add_argument( | |
'-c', '--control', | |
dest='control', | |
default='ipc://control.sock', | |
help='Endpoint for nrv control.', | |
) | |
return parser | |
def prepare_to_run_command(self, cmd): | |
self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__) | |
def clean_up(self, cmd, result, err): | |
self.log.debug('clean_up %s', cmd.__class__.__name__) | |
if err: | |
self.log.debug('got an error: %s', err) | |
def main(argv=sys.argv[1:]): | |
myapp = Nrvsh() | |
return myapp.run(argv) | |
if __name__ == '__main__': | |
sys.exit(main(sys.argv[1:])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment