X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fcli_commands%2Futils.py;h=9ec03f61977ff54c6380c6a3d53ed5584b7e5dfd;hb=refs%2Fchanges%2F14%2F13914%2F1;hp=5ac9931a2efedd426ddbaf7b674c234b9f500822;hpb=00bc0353583beab960fb853375dc1e8f4a77840d;p=osm%2Fosmclient.git diff --git a/osmclient/cli_commands/utils.py b/osmclient/cli_commands/utils.py index 5ac9931..9ec03f6 100755 --- a/osmclient/cli_commands/utils.py +++ b/osmclient/cli_commands/utils.py @@ -44,14 +44,11 @@ def check_client_version(obj, what, version="sol005"): :raises ClientError: if the specified version does not match the client version """ logger.debug("") + if version == "sol005": + message = f"The following commands or options are only supported with the version v1 of OSM SOL005': {what}" + elif version == "sol005_v2": + message = f"The following commands or options are only supported with the version v2 of OSM SOL005': {what}" fullclassname = obj.__module__ + "." + obj.__class__.__name__ - message = 'The following commands or options are only supported with the option "--sol005": {}'.format( - what - ) - if version == "v1": - message = 'The following commands or options are not supported when using option "--sol005": {}'.format( - what - ) if fullclassname != "osmclient.{}.client.Client".format(version): raise ClientException(message) return