Skip to content

Commit

Permalink
Some logging for swallowed exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Aug 17, 2018
1 parent 5932174 commit eddd9e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/passa/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def _get_dependencies_from_cache(ireq):
broken = True

if broken:
print("dropping broken cache for {0}".format(ireq.name))
del DEPENDENCY_CACHE[ireq]
return

Expand Down Expand Up @@ -134,8 +135,9 @@ def _get_dependencies_from_json(ireq, sources):
dependencies = _get_dependencies_from_json_url(url, session)
if dependencies is not None:
return dependencies
except Exception:
continue
except Exception as e:
pass
print("unable to read dependencies via {0}".format(url))
return


Expand Down
2 changes: 1 addition & 1 deletion src/passa/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_dependencies(self, candidate):
except Exception as e:
if os.environ.get("PASSA_NO_SUPPRESS_EXCEPTIONS"):
raise
print('failed to get dependencies for {0!r}: {1}'.format(
print("failed to get dependencies for {0!r}: {1}".format(
candidate.as_line(), e,
))
return []
Expand Down

0 comments on commit eddd9e6

Please sign in to comment.