summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/objects/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/objects/server.py b/cli/objects/server.py
index a2f299d..c3f83a8 100644
--- a/cli/objects/server.py
+++ b/cli/objects/server.py
@@ -24,6 +24,11 @@ class OgServer():
required=True,
help='valid ogserver ip address')
parsed_args = parser.parse_args(args)
+
+ if not check_address(parsed_args.address):
+ print(f'Invalid IP address: {parsed_args.address}')
+ return
+
payload = {'address': parsed_args.address}
rest.post('/server', payload=payload)