Skip to content

Commit 54bbe83

Browse files
committed
Change try to suppress
1 parent dd0aaf9 commit 54bbe83

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

robotpy_build/tool.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from urllib.error import HTTPError
1212
from collections import defaultdict
1313
import toml
14+
from contextlib import suppress
1415

1516
from .setup import Setup
1617
from .generator_data import MissingReporter
@@ -288,11 +289,9 @@ def add_subparser(cls, parent_parser, subparsers):
288289
return parser
289290

290291
def check_url_exists(self, file_url):
291-
try:
292+
with suppress(Exception):
292293
if urlopen(Request(file_url)).code == 200:
293294
return True
294-
except:
295-
pass
296295
return False
297296

298297
def run(self, args):

0 commit comments

Comments
 (0)