diff --git a/.gitignore b/.gitignore index 7d53642..a56d82f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ test.py .DS_Store .idea .vscode +old_*.py # # Github Default from https://github.com/martinohanlon/flightlight/issues/1 # Byte-compiled / optimized / DLL files diff --git a/hyperglass/api/__init__.py b/hyperglass/api/__init__.py index e0b52b7..a9de039 100644 --- a/hyperglass/api/__init__.py +++ b/hyperglass/api/__init__.py @@ -1,6 +1,7 @@ """hyperglass REST API & Web UI.""" # Standard Library +import sys from typing import List from pathlib import Path @@ -265,4 +266,7 @@ def start(**kwargs): """Start the web server with Uvicorn ASGI.""" import uvicorn - uvicorn.run("hyperglass.api:app", **ASGI_PARAMS, **kwargs) + try: + uvicorn.run("hyperglass.api:app", **ASGI_PARAMS, **kwargs) + except KeyboardInterrupt: + sys.exit(1) diff --git a/hyperglass/configuration/models/commands/cisco_ios.py b/hyperglass/configuration/models/commands/cisco_ios.py index 76f61aa..40fff33 100644 --- a/hyperglass/configuration/models/commands/cisco_ios.py +++ b/hyperglass/configuration/models/commands/cisco_ios.py @@ -23,7 +23,7 @@ class _IPv6(CommandSet): bgp_community: StrictStr = "show bgp ipv6 unicast community {target}" bgp_aspath: StrictStr = 'show bgp ipv6 unicast quote-regexp "{target}"' bgp_route: StrictStr = "show bgp ipv6 unicast {target} | exclude pathid:|Epoch" - ping: StrictStr = ("ping ipv6 {target} repeat 5 source {source}") + ping: StrictStr = "ping ipv6 {target} repeat 5 source {source}" traceroute: StrictStr = ( "traceroute ipv6 {target} timeout 1 probe 2 source {source}" )