diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 5d331838ee462a23134561cf6185153064c1f4d1..2976e198255660d511d1083f75171058181d95a3 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -15,7 +15,7 @@ import click from osmclient import client -from osmclient.common.exceptions import ClientException +from osmclient.common.exceptions import ClientException, NotFound from osmclient.cli_commands import ( alarms, app_profile, @@ -367,11 +367,13 @@ def cli(): print( 'Maybe "--hostname" option or OSM_HOSTNAME environment variable needs to be specified' ) - except ClientException as exc: - print("ERROR: {}".format(exc)) + except NotFound as exc: + print("NOT FOUND: {}".format(exc)) print( 'Maybe "--hostname" option or OSM_HOSTNAME environment variable needs to be specified' ) + except ClientException as exc: + print("ERROR: {}".format(exc)) except (FileNotFoundError, PermissionError) as exc: print("Cannot open file: {}".format(exc)) except yaml.YAMLError as exc: