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

Error? #6

Open
patrickchoi opened this issue Jan 4, 2016 · 1 comment
Open

Error? #6

patrickchoi opened this issue Jan 4, 2016 · 1 comment

Comments

@patrickchoi
Copy link

Got this in my shell, not sure if it means anything:

screen shot 2016-01-04 at 9 54 05 am

@atjones0011
Copy link

You will see this error when you have no reservations and when you have no running instances. To get around this problem, I added conditional logic around the summations. The below if...else blocks will resolve this error.

if len(running_instances.values()) > 0:
        qty_running_instances = reduce( lambda x, y: x+y, running_instances.values() )
else:
        qty_running_instances = 0

if len(reserved_instances.values()) > 0:
        qty_reserved_instances = reduce( lambda x, y: x+y, reserved_instances.values() )
else:
        qty_reserved_instances = 0

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

No branches or pull requests

2 participants