Commit b1b4637b authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Handle IndexError in pool-show cmd

Handle IndexError exception that is raised when the user does not
provide a pool ID.
parent 0fb45dad
......@@ -45,6 +45,8 @@ class Command(SynnefoCommand):
pool_id = int(args[0])
pool_row = pool_table.objects.get(id=pool_id)
except IndexError:
raise CommandError("Please provider a pool ID")
except (ValueError, pool_table.DoesNotExist):
raise CommandError("Invalid pool ID")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment