def run(this, stdout=None, stderr=None, stdin=None, cwd=None):
    nailgun = None
    try:
        nailgun = self._get_nailgun_client(jvm_options, classpath, stdout, stderr, stdin)
        logger.debug('Executing via {ng_desc}: {cmd}'.format(ng_desc=nailgun, cmd=this.cmd))
        return nailgun.execute(main, cwd, *args)
    except (NailgunClient.NailgunError, self.InitialNailgunConnectTimedOut) as e:
        self.terminate()
        raise self.Error('Problem launching via {ng_desc} command {main} {args}: {msg}'.format(ng_desc=(nailgun or '<no nailgun connection>'), main=main, args=' '.join(args), msg=e))
def run(this, stdout=None, stderr=None, stdin=None, cwd=None):
    nailgun = None
    try:
        nailgun = self._get_nailgun_client(jvm_options, classpath, stdout, stderr, stdin)
        logger.debug('Executing via {ng_desc}: {cmd}'.format(ng_desc=nailgun, cmd=this.cmd))
        return nailgun.execute(main, cwd, *args)
    except (NailgunClient.NailgunError, self.InitialNailgunConnectTimedOut) as e:
        self.terminate()
        raise self.Error('Problem launching via {ng_desc} command {main} {args}: {msg}'.format(ng_desc=(nailgun or '<no nailgun connection>'), main=main, args=' '.join(args), msg=e))