projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Revert "Remove v1 version of osmclient which was used with old NBI (pre-Relea...
[osm/osmclient.git]
/
osmclient
/
scripts
/
osm.py
diff --git
a/osmclient/scripts/osm.py
b/osmclient/scripts/osm.py
index
e5be118
..
74bb84b
100755
(executable)
--- a/
osmclient/scripts/osm.py
+++ b/
osmclient/scripts/osm.py
@@
-41,9
+41,8
@@
from osmclient.cli_commands import (
wim,
)
import yaml
wim,
)
import yaml
-import pycurl
-import os
import logging
import logging
+from requests import RequestException
@click.group(
@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}
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")
logger = logging.getLogger("osmclient")
@@
-292,7
+290,7
@@
def cli():
cli_osm()
exit(0)
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'
print(exc)
print(
'Maybe "--hostname" option or OSM_HOSTNAME environment variable needs to be specified'