Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix index error when a new service (or one that doesn't have yesterday's cost) #8

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

rwilson-release
Copy link
Contributor

Before:

{
    "errorMessage": "list index out of range",
    "errorType": "IndexError",
    "stackTrace": [
        "  File \"/var/task/handler.py\", line 101, in report_cost\n    buffer += f\"{service_name:{longest_name_len}} ${costs[-1]:8,.2f} {delta(costs):4.0f}% {sparkline(costs):7}\\n\"\n",
        "  File \"/var/task/handler.py\", line 31, in delta\n    if (costs[-1] >= 1 and costs[-2] >= 1):\n"
    ]
}

After:

null

@iandees iandees merged commit 9f0c92f into iandees:master Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants