Skip to content

Commit

Permalink
Include function name in service data return and in output file name
Browse files Browse the repository at this point in the history
  • Loading branch information
sleonov authored and valter-silva-au committed Feb 7, 2024
1 parent c88334a commit 0a5ecb6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ def _get_service_data(session, region_name, service, log, max_retries, retry_del
region_name,
response,
)
return {"region": region_name, "service": service["service"], "result": response}
return {
"region": region_name,
"service": service["service"],
"function": service["function"],
"result": response}


def process_region(
Expand Down Expand Up @@ -319,7 +323,7 @@ def main(
except NotADirectoryError:
log.error("Invalid directory name: %s", directory)
with open(
os.path.join(directory, f"{service_result['service']}.json"),
os.path.join(directory, f"{service_result['service']}-{service_result['function']}.json"),
"w",
) as f:
json.dump(service_result["result"], f, cls=DateTimeEncoder)
Expand Down

0 comments on commit 0a5ecb6

Please sign in to comment.