You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Quentin Pradet (JIRA)" <ji...@apache.org> on 2017/05/04 06:53:04 UTC

[jira] [Commented] (LIBCLOUD-914) s3.upload_object_via_stream now returns a generic error

    [ https://issues.apache.org/jira/browse/LIBCLOUD-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15996261#comment-15996261 ] 

Quentin Pradet commented on LIBCLOUD-914:
-----------------------------------------

Note that using `get_container()` does not work around the issue, because `get_container()` ignores `InvalidCredsError` explicitly and just builds a `Container()` object using its arguments.

> s3.upload_object_via_stream now returns a generic error
> -------------------------------------------------------
>
>                 Key: LIBCLOUD-914
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-914
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>            Reporter: Quentin Pradet
>
> Consider the following snippet:
> {code}
> import io
> from libcloud.storage.base import Container
> from libcloud.storage.drivers.google_storage import GoogleStorageDriver
> driver = GoogleStorageDriver(key='GOOG0123456789ABCXYZ', secret='garbage')
> container = Container(name='container', driver=driver, extra={})
> driver.upload_object_via_stream(io.BytesIO(b' '), container, 'path')
> {code}
> I use wrong credentials on purpose. With libcloud 1.5.0, {{upload_object_via_stream}} raises libcloud.common.types.InvalidCredsError. With libcloud 2.0.0 and trunk, this returns the generic {{libcloud.common.types.LibcloudError}} with the message {{'Object upload failed, Perhaps a timeout?'}}.
> Is it possible to restore the old behavior?
> Thanks for libcloud.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)