Exemplo n.º 1
0
    def do_run_survey(self, line):
        '''
        run_survey <source_name>
            
        runs the survey function for the given source
        
        [source_name] - option name of source to process
        '''

	args = shlex.split(line)
	
	if len(args) < 1:
            print "Error: Incorrect # of arguments"
	    return

        src_obj = core.get_source_info(self.cnx, args[0])
        
        if src_obj is None:
            print "Error: Unable to find source {}".format(args[0])
            return
        else:
            rpt = Report(self.cnx, src_obj)
	    if len(args) > 1:
        	rpt.run(args[1:])
	    else:
		rpt.run(None)