Skip to content

Commit

Permalink
Print exception if it's of type URLError
Browse files Browse the repository at this point in the history
This prints the exception out if it's of type URLError when trying to
retrieve the default rosdep source list. This is intended to help others
debug #934 should they run into it.

Signed-off-by: Shane Loretz <[email protected]>
  • Loading branch information
sloretz committed Feb 19, 2024
1 parent 5ca91b8 commit 6a824e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rosdep2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ def command_init(options):
data = download_default_sources_list()
except URLError as e:
print('ERROR: cannot download default sources list from:\n%s\nWebsite may be down.' % (DEFAULT_SOURCES_LIST_URL), file=sys.stderr)
print(e, file=sys.stderr)
return 4
except DownloadFailure as e:
print('ERROR: cannot download default sources list from:\n%s\nWebsite may be down.' % (DEFAULT_SOURCES_LIST_URL), file=sys.stderr)
Expand Down

0 comments on commit 6a824e7

Please sign in to comment.