Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ptitzler opened this issue Jul 30, 2019 · 0 comments
Open

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

ptitzler opened this issue Jul 30, 2019 · 0 comments

Comments

@ptitzler
Copy link

ptitzler commented Jul 30, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant