Skip to content

Pubsub.list_topics fails when there are no topics #1439

Closed

Description

@dhermes

Offending line. Reproduce via:

client = pubsub.Client()
>>> client.list_topics()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gcloud/pubsub/client.py", line 80, in list_topics
    for resource in resp['topics']]
KeyError: 'topics'

@tseaver ISTM we should locate all instances where we assume a key is present and just protect against this. The time between releases behooves us to be "protective" of users. (I realize that we've usually done it this way based on documented outputs.)

Activity

  1. added
    type: bug
    api: pubsub
    on Feb 2, 2016
  2. dhermes commented on Feb 2, 2016

    @dhermes
    ContributorAuthor

    Found while reproducing #1438

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

Metadata

Metadata

Assignees

Labels

api: pubsubtype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions