Skip to content

Commit

Permalink
Don't bend over backward to avoid passing empty .
Browse files Browse the repository at this point in the history
Addresses: #742 (comment)
  • Loading branch information
tseaver committed Mar 18, 2015
1 parent 9cd9cf6 commit 703d56b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions gcloud/pubsub/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,4 @@ def list_topics(page_size=None, page_token=None,
params['pageToken'] = page_token

path = '/projects/%s/topics' % project
if params:
return connection.api_request(method='GET', path=path,
query_params=params)
return connection.api_request(method='GET', path=path)
return connection.api_request(method='GET', path=path, query_params=params)
2 changes: 1 addition & 1 deletion gcloud/pubsub/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_w_explicit_connection_no_paging(self):
req = conn._requested[0]
self.assertEqual(req['method'], 'GET')
self.assertEqual(req['path'], '/projects/%s/topics' % PROJECT)
self.assertEqual(req.get('query_params'), None)
self.assertEqual(req['query_params'], {})

def test_w_explicit_connection_w_paging(self):
TOPIC_NAME = 'topic_name'
Expand Down

0 comments on commit 703d56b

Please sign in to comment.