tashi-client: do error checking on parameters to getslots

git-svn-id: https://svn.apache.org/repos/asf/incubator/tashi/trunk@1354214 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/tashi/client/tashi-client.py b/src/tashi/client/tashi-client.py
index aa2325f..c3f23f0 100755
--- a/src/tashi/client/tashi-client.py
+++ b/src/tashi/client/tashi-client.py
@@ -186,6 +186,14 @@
 	hosts = getVmLayout()
 	count = 0
 
+	if cores < 1:
+		print "Argument to cores must be 1 or greater."
+		return
+
+	if memory <= 0:
+		print "Argument to memory must be greater than 0."
+		return
+
 	for h in hosts:
 		if h.up is False or h.state != HostState.Normal:
 			continue