Skip to content

list_subscriptions does not work properly #1485

@bitcpf

Description

@bitcpf

list_subscriptions() works but list_subscriptions(topic_name = 'topic_name') does not work properly

>>> from gcloud import pubsub
>>> client = pubsub.Client(project = 'my_project')
>>> client.list_subscriptions(topic_name = 'my_topic')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/gcloud/pubsub/client.py", line 131, in list_subscriptions
    for resource in resp['subscriptions']]
  File "/usr/local/lib/python2.7/dist-packages/gcloud/pubsub/subscription.py", line 68, in from_api_repr
    topic_path = resource['topic']
TypeError: string indices must be integers

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions