From 197e0accd6c7ea146b246b2fc55e42ba103b13a3 Mon Sep 17 00:00:00 2001 From: Efren Rey Gonzalez Date: Mon, 14 Nov 2022 17:16:40 +0100 Subject: [PATCH] Fix reserved words since python3.7 --- src/clc/APIv1/shell.py | 8 ++++---- src/setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/clc/APIv1/shell.py b/src/clc/APIv1/shell.py index 3cdbd8a..9f6ce96 100644 --- a/src/clc/APIv1/shell.py +++ b/src/clc/APIv1/shell.py @@ -344,7 +344,7 @@ def ParseArgs(self): parser.add_argument('--v1-api-passwd', metavar='PASSWORD', help='V1 API password') parser.add_argument('--v2-api-username', metavar='USERNAME', help='V2 API username') parser.add_argument('--v2-api-passwd', metavar='PASSWORD', help='V2 API password') - parser.add_argument('--async', action="store_true", default=False, help='Return immediately after queueing long-running calls') + parser.add_argument('--async', action="store_true", dest='is_async', default=False, help='Return immediately after queueing long-running calls') parser.add_argument('--quiet', '-q', action='count', help='Supress status output (repeat up to 2 times)') parser.add_argument('--verbose', '-v', action='count', help='Increase verbosity') parser.add_argument('--format', '-f', choices=['json','table','text','csv'], default='table', help='Output result format (table is default)') @@ -709,7 +709,7 @@ def AddServerDisk(self): def ServerActions(self,action): - clc.args.args.async = True # Force async - we can't current deal with multiple queued objects + clc.args.args.is_async = True # Force async - we can't current deal with multiple queued objects r = self.Exec('clc.v1.Server.%s' % (action), { 'alias': self._GetAlias(), 'servers': clc.args.GetArgs().server }, cols=['RequestID','StatusCode','Message']) @@ -898,7 +898,7 @@ def GetBlueprintsPackageUpload(self): def PublishBlueprintsPackage(self): - clc.args.args.async = True + clc.args.args.is_async = True if clc.args.args.os is None: r = self.Exec('clc.v1.Blueprint.PackagePublishUI', { 'package': clc.args.args.package, 'classification': clc.args.args.type, 'visibility': clc.args.args.visibility }, @@ -919,7 +919,7 @@ def Exec(self,function,args=False,cols=None,supress_output=False): # Output results # TODO - how do we differentiate blueprints vs. queue RequestIDs? - if r is not None and 'RequestID' in r and not clc.args.args.async: + if r is not None and 'RequestID' in r and not clc.args.args.is_async: r = clc.v1.output.RequestBlueprintProgress(r['RequestID'],self._GetLocation(),self._GetAlias(),clc.args.args.quiet) cols = ['Server'] diff --git a/src/setup.py b/src/setup.py index 5ed5a60..2f1d62e 100644 --- a/src/setup.py +++ b/src/setup.py @@ -11,7 +11,7 @@ setup( name = "clc-sdk", - version = "2.50", + version = "2.51", packages = find_packages("."), install_requires = ['prettytable','clint','argparse','requests'],