Skip to content

Commit ed62090

Browse files
author
Jon Wayne Parrott
committed
Fix a few more lint issues
Change-Id: I0d420f3053f391fa225e4b8179e45fd1138f5c65
1 parent 4231057 commit ed62090

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

language/movie_nl/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def get_wiki_title(wiki_url):
128128
try:
129129
content = requests.get(wiki_url).text
130130
return content.split('title')[1].split('-')[0].split('>')[1].strip()
131-
except:
131+
except KeyError:
132132
return os.path.basename(wiki_url).replace('_', ' ')
133133

134134

logging/cloud-client/export_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def example_sink():
4848

4949
try:
5050
sink.delete()
51-
except:
51+
except Exception:
5252
pass
5353

5454

@@ -72,7 +72,7 @@ def test_create(capsys):
7272
finally:
7373
try:
7474
logging.Client().sink(sink_name).delete()
75-
except:
75+
except Exception:
7676
pass
7777

7878
out, _ = capsys.readouterr()

pubsub/cloud-client/iam_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def topic(publisher_client):
3535

3636
try:
3737
publisher_client.delete_topic(topic_path)
38-
except:
38+
except Exception:
3939
pass
4040

4141
publisher_client.create_topic(topic_path)
@@ -55,7 +55,7 @@ def subscription(subscriber_client, topic):
5555

5656
try:
5757
subscriber_client.delete_subscription(subscription_path)
58-
except:
58+
except Exception:
5959
pass
6060

6161
subscriber_client.create_subscription(subscription_path, topic=topic)

pubsub/cloud-client/publisher_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def topic(client):
3535

3636
try:
3737
client.delete_topic(topic_path)
38-
except:
38+
except Exception:
3939
pass
4040

4141
client.create_topic(topic_path)
@@ -55,7 +55,7 @@ def test_create(client):
5555
topic_path = client.topic_path(PROJECT, TOPIC)
5656
try:
5757
client.delete_topic(topic_path)
58-
except:
58+
except Exception:
5959
pass
6060

6161
publisher.create_topic(PROJECT, TOPIC)

pubsub/cloud-client/quickstart_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def temporary_topic():
3333

3434
try:
3535
publisher.delete_topic(TOPIC_PATH)
36-
except:
36+
except Exception:
3737
pass
3838

3939
yield

pubsub/cloud-client/subscriber_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def topic(publisher_client):
3838

3939
try:
4040
publisher_client.delete_topic(topic_path)
41-
except:
41+
except Exception:
4242
pass
4343

4444
publisher_client.create_topic(topic_path)
@@ -58,7 +58,7 @@ def subscription(subscriber_client, topic):
5858

5959
try:
6060
subscriber_client.delete_subscription(subscription_path)
61-
except:
61+
except Exception:
6262
pass
6363

6464
subscriber_client.create_subscription(subscription_path, topic=topic)
@@ -79,7 +79,7 @@ def test_create(subscriber_client):
7979
PROJECT, SUBSCRIPTION)
8080
try:
8181
subscriber_client.delete_subscription(subscription_path)
82-
except:
82+
except Exception:
8383
pass
8484

8585
subscriber.create_subscription(PROJECT, TOPIC, SUBSCRIPTION)

0 commit comments

Comments
 (0)