Skip to content
Snippets Groups Projects
Commit 137d334e authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Remove no-longer-used calparrot.stop module

parent b81536a3
No related branches found
No related tags found
No related merge requests found
import argparse
import logging
import sys
from tornado.httpclient import HTTPClient
def main():
ap = argparse.ArgumentParser()
ap.add_argument('port', type=int, help="Port number of CalParrot server")
args = ap.parse_args()
logging.basicConfig(level=logging.INFO)
client = HTTPClient()
client.fetch(f"http://127.0.0.1:{args.port}/.calparrot/stop", method='POST',
allow_nonstandard_methods=True) # POST with no body
logging.info("Asked CalParrot server to shut down")
if __name__ == '__main__':
sys.exit(main())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment