Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Python package: action source code does not import ClientError #42

@ptitzler

Description

@ptitzler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions