Beispiel #1
0
    def linkMumble(self):

        # Launch mumble and connect to correct server
        if not self.launchMumble():
            self.mumbleFailed = 1
            return 0

        # Try to link. This may take up to 40 seconds until we bail out
        for i in range(1, 8):
            logger.debug("Trying to connect link plugin: " + str(i))

            if mumble_link.setup(self.pluginName, self.pluginDescription):
                logger.info("Mumble link established")
                self.mumbleSetup = 1
                return 1

            # FIXME: Replace with something nonblocking?
            time.sleep(i)

        logger.info("Mumble link failed")
        self.mumbleFailed = 1
        return 0
    def linkMumble(self):
        
        # Launch mumble and connect to correct server
        if not self.launchMumble():
            self.mumbleFailed = 1
            return 0

        # Try to link. This may take up to 40 seconds until we bail out
        for i in range (1,8):
            logger.debug("Trying to connect link plugin: " + str(i))

            if mumble_link.setup(self.pluginName, self.pluginDescription):
                logger.info("Mumble link established")
                self.mumbleSetup = 1
                return 1

            # FIXME: Replace with something nonblocking?
            time.sleep(i)
            
            
        logger.info("Mumble link failed")
        self.mumbleFailed = 1
        return 0
Beispiel #3
0
	if len(sys.argv) != 2:
		print>>sys.stderr, "Usage: %s [stepfile]" % sys.argv[0]
		sys.exit(1)
	
	try:
		cfg = __import__(sys.argv[1])
		
		name = cfg.name
		description = cfg.description
		
		steps = cfg.steps
	except (ImportError, AttributeError), e:
		print>>sys.stderr, "Failed to get step list: " + str(e)
		sys.exit(1)
		
	mumble_link.setup(name, description)
	
	cnt = 0
	for step in steps:
		for what, parameters in step:
			cmd = "set_%s" % what
			print "%.3d %s(*%s)" % (cnt, cmd, repr(parameters))

		raw_input("Press enter to execute step")
		
		for what, parameters in step:
			cmd = "set_%s" % what
			getattr(mumble_link, cmd)(*parameters)
		cnt += 1
		
	raw_input("Steps completed, press enter to quit")