From ad667810734e2d903f57126af8b64fea98dc92b8 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Tue, 24 Oct 2017 12:14:35 -0700 Subject: [PATCH] Fix a few more lint issues Change-Id: I0d420f3053f391fa225e4b8179e45fd1138f5c65 --- samples/snippets/iam_test.py | 4 ++-- samples/snippets/publisher_test.py | 4 ++-- samples/snippets/quickstart_test.py | 2 +- samples/snippets/subscriber_test.py | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/snippets/iam_test.py b/samples/snippets/iam_test.py index 3deaec746..8a524c35a 100644 --- a/samples/snippets/iam_test.py +++ b/samples/snippets/iam_test.py @@ -35,7 +35,7 @@ def topic(publisher_client): try: publisher_client.delete_topic(topic_path) - except: + except Exception: pass publisher_client.create_topic(topic_path) @@ -55,7 +55,7 @@ def subscription(subscriber_client, topic): try: subscriber_client.delete_subscription(subscription_path) - except: + except Exception: pass subscriber_client.create_subscription(subscription_path, topic=topic) diff --git a/samples/snippets/publisher_test.py b/samples/snippets/publisher_test.py index b400c9f24..120148c0a 100644 --- a/samples/snippets/publisher_test.py +++ b/samples/snippets/publisher_test.py @@ -35,7 +35,7 @@ def topic(client): try: client.delete_topic(topic_path) - except: + except Exception: pass client.create_topic(topic_path) @@ -55,7 +55,7 @@ def test_create(client): topic_path = client.topic_path(PROJECT, TOPIC) try: client.delete_topic(topic_path) - except: + except Exception: pass publisher.create_topic(PROJECT, TOPIC) diff --git a/samples/snippets/quickstart_test.py b/samples/snippets/quickstart_test.py index 71e157d48..520213bcf 100644 --- a/samples/snippets/quickstart_test.py +++ b/samples/snippets/quickstart_test.py @@ -33,7 +33,7 @@ def temporary_topic(): try: publisher.delete_topic(TOPIC_PATH) - except: + except Exception: pass yield diff --git a/samples/snippets/subscriber_test.py b/samples/snippets/subscriber_test.py index 0acadf437..2cc955d9d 100644 --- a/samples/snippets/subscriber_test.py +++ b/samples/snippets/subscriber_test.py @@ -38,7 +38,7 @@ def topic(publisher_client): try: publisher_client.delete_topic(topic_path) - except: + except Exception: pass publisher_client.create_topic(topic_path) @@ -58,7 +58,7 @@ def subscription(subscriber_client, topic): try: subscriber_client.delete_subscription(subscription_path) - except: + except Exception: pass subscriber_client.create_subscription(subscription_path, topic=topic) @@ -79,7 +79,7 @@ def test_create(subscriber_client): PROJECT, SUBSCRIPTION) try: subscriber_client.delete_subscription(subscription_path) - except: + except Exception: pass subscriber.create_subscription(PROJECT, TOPIC, SUBSCRIPTION)