in aws_lambda_builders/workflows/python_pip/packager.py [0:0]
def _has_at_least_one_package(self, filename):
if not self._osutils.file_exists(filename):
return False
with open(filename, "r") as f:
# This is meant to be a best effort attempt.
# This can return True and still have no packages
# actually being specified, but those aren't common
# cases.
for line in f:
stripped_line = line.strip()
if stripped_line and not stripped_line.startswith("#"):
return True
return False