Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, package):
message = '%s not found' % package
super(PackageNotFoundError, self).__init__(message)
def _raise_if_not_exists(package):
if not exists(package):
raise PackageNotFoundError(package)