I imported the cloud-object-storage package and noticed that the source code does not import ClientError in many actions, e.g. object-read, object-write, object-delete.
import sys
import json
import ibm_boto3
from ibm_botocore.client import Config
def main(args):
resultsGetParams = getParamsCOS(args)
cos = resultsGetParams['cos']
params = resultsGetParams['params']
bucket = params['bucket']
key = params['key']
...
except ClientError as e:
print(e)
raise e
In case an exception is raised this code blows up because there's a from ibm_botocore.client import ClientError missing.
I imported the
cloud-object-storage
package and noticed that the source code does not importClientError
in many actions, e.g.object-read
,object-write
,object-delete
.In case an exception is raised this code blows up because there's a
from ibm_botocore.client import ClientError
missing.