exit(0)
		
		if res==-4:
			print 'The service "%s" is not attached to "%s"' % (args[2],args[1])
			exit(0)

	if cmd == "listservices":
		parser.set_usage("usage: %s %s groupname" % (shell_cmd_name,cmd))

		groupname = None
		(options, args) = parser.parse_args()
		if len(args)>=2:
			groupname = args[1]

		gm = GroupManager()
		res = gm.list_services(groupname)
		if type(res) == list:
			for s in res:
				print s
				
		if res==-1:
			print 'There is no service group by that name. NOTE! the group must be a service group.'
			exit(-1)
		
	if cmd == "listserviceoptions":
		def fish_dict_value(d,key,defval=""):
			# Safely fish out values from a dictionary
			if d.has_key(key):
				return d[key]
			return defval