From 48f596436c06ddb36329ec7422259dbbb5fb27bc Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 29 Feb 2024 11:26:10 +0100 Subject: remove duplicated parse_args in repo.py and server.py Remove the line 'parsed_args = parser.parse_args(args)' parsing the command line arguments a second time when it is not needed. --- cli/objects/repo.py | 1 - cli/objects/server.py | 1 - 2 files changed, 2 deletions(-) diff --git a/cli/objects/repo.py b/cli/objects/repo.py index c287926..a85f7a3 100644 --- a/cli/objects/repo.py +++ b/cli/objects/repo.py @@ -88,6 +88,5 @@ class OgRepo(): print('No valid clients specified.') return - parsed_args = parser.parse_args(args) payload = {'id': parsed_args.id, 'clients': list(ips)} rest.post('/client/repo', payload=payload) diff --git a/cli/objects/server.py b/cli/objects/server.py index 38cc6b0..a564f59 100644 --- a/cli/objects/server.py +++ b/cli/objects/server.py @@ -74,6 +74,5 @@ class OgServer(): print('No clients specified.') return - parsed_args = parser.parse_args(args) payload = {'id': parsed_args.id, 'clients': list(ips)} rest.post('/client/server', payload=payload) -- cgit v1.2.3-18-g5258