X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fosmclient.git;a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;fp=osmclient%2Fscripts%2Fosm.py;h=74bb84ba97eaa8022b70c66e8af6d63e0d29b95e;hp=e5be118821a0caf875293aa5edc3ab83fb2f5c62;hb=0046a316387d86e5df191b0aece617fcedeabb26;hpb=2947e79a42d945edf7b1eed50ccb6191329a9dc3 diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index e5be118..74bb84b 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -41,9 +41,8 @@ from osmclient.cli_commands import ( wim, ) import yaml -import pycurl -import os import logging +from requests import RequestException @click.group( @@ -115,8 +114,7 @@ def cli_osm(ctx, **kwargs): exit(1) # Remove None values kwargs = {k: v for k, v in kwargs.items() if v is not None} - sol005 = os.getenv("OSM_SOL005", True) - ctx.obj = client.Client(host=hostname, sol005=sol005, **kwargs) + ctx.obj = client.Client(version=1, host=hostname, **kwargs) logger = logging.getLogger("osmclient") @@ -292,7 +290,7 @@ def cli(): cli_osm() exit(0) - except pycurl.error as exc: + except RequestException as exc: print(exc) print( 'Maybe "--hostname" option or OSM_HOSTNAME environment variable needs to be specified'